We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10329
This bug can be worked around by wrapping column names in quotes.
Example:
{{let query = "SELECT 16_20mph, 21_25mph FROM foo;"}}
{{let logical_plan = ctx.create_logical_plan(query)?;}}
{{logical_plan.schema().fields() now has fields: [_20mph, _25mph]}}
The resulting table produced by this query looks like: ||{{_20mph}}||{{_25mph}}|| |16|21| |16|21|
Every row is identical, where the column value is equal to the initial number that appears in the column name.
The text was updated successfully, but these errors were encountered:
Comment from Ben Sully(sd2k) @ 2020-11-08T11:46:18.008+0000:
This behaviour seems consistent with Postgres at least: {{❯ psql}} {{psql (12.4)}} {{Type "help" for help.}} {{ben=# create table foo ("16_20mph" integer, "21_25mph" integer);}} {{CREATE TABLE}} {{ben=# insert into foo values (1, 2), (3, 4);}} {{INSERT 0 2}} {{ben=# SELECT 16_20mph, 21_25mph FROM foo;}} {{ _20mph | _25mph }} {{--------+--------}} {{ 16 | 21}} {{ 16 | 21}} {{(2 rows)}} {{ben=# SELECT "16_20mph", "21_25mph" FROM foo;}} {{ 16_20mph | 21_25mph }} {{----------+----------}} {{ 1 | 2}} {{ 3 | 4}} {{(2 rows)}}
Sorry, something went wrong.
I believe this can be closed as its expected behaviour stemming from sqlparser, recent relevant discussion: apache/datafusion-sqlparser-rs#768 (comment)
I agree -- thanks @Jefffrey -- I agree this is "expected behavior" in the sense that it is what postgres does even though it is not very obvious
No branches or pull requests
Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10329
This bug can be worked around by wrapping column names in quotes.
Example:
{{let query = "SELECT 16_20mph, 21_25mph FROM foo;"}}
{{let logical_plan = ctx.create_logical_plan(query)?;}}
{{logical_plan.schema().fields() now has fields: [_20mph, _25mph]}}
The resulting table produced by this query looks like:
||{{_20mph}}||{{_25mph}}||
|16|21|
|16|21|
Every row is identical, where the column value is equal to the initial number that appears in the column name.
The text was updated successfully, but these errors were encountered: