【发布时间】:2012-07-06 10:33:15
【问题描述】:
我正在使用 Google BigQuery,但对它提供的 POSITION(field) 函数有疑问。
我认为 POSITION 函数返回嵌套字段中查询中值的位置。
但我很惊讶它也适用于非嵌套字段。
例如。
SELECT url, POSITION(url) FROM [publicdata:samples.github_timeline] WHERE url="https://github.com/oscardelben/sheet";
输出是
Row url f0_
1 https://github.com/oscardelben/sheet 1
2 https://github.com/oscardelben/sheet 2
3 https://github.com/oscardelben/sheet 3
4 https://github.com/oscardelben/sheet 4
5 https://github.com/oscardelben/sheet 5
6 https://github.com/oscardelben/sheet 6
7 https://github.com/oscardelben/sheet 1
8 https://github.com/oscardelben/sheet 2
9 https://github.com/oscardelben/sheet 3
....
...
..
.
在这种情况下,POSITION(url) 是什么意思? 谷歌 BigQuery 示例提供的任何嵌套字段也可以用来测试吗?
谢谢你
【问题讨论】: