sijocherian / google-bigquery

Automatically exported from code.google.com/p/google-bigquery
0 stars 0 forks source link

query fails with window function and quoted reserved column name #279

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a table with 3 columns named: id, modified, following

2. Perform the following query: 
SELECT MAX(modified) OVER (PARTITION BY id), [following] FROM [dataset0.table]

3. Fails.  Removing the window function - works, aliasing the "following" 
column works.  Seems like there is a query-rewrite step which is incorrect.  
Preceding the window function with [following] reference also fails.

What is the expected output? What do you see instead?
Expected successful query execution, instead: 

---
Error: syntax error at: 1:74 expecting: EOF but got: "SELECT"

---

What version of the product are you using? On what operating system?
not relevant, this is the hosted bigquery instance in google

Please provide any additional information below.

Original issue reported on code.google.com by j...@usekahuna.com on 7 Jul 2015 at 6:55