Replies: 4 comments 4 replies
-
I think you can set set datafusion.sql_parser.enable_ident_normalization = false; |
Beta Was this translation helpful? Give feedback.
0 replies
-
thanks, could you tell me how to set it in python CLI? |
Beta Was this translation helpful? Give feedback.
1 reply
-
seems no effect after setting >>> import datafusion
>>> sc=datafusion.SessionConfig(config_options=None)
>>> sc.set("datafusion.sql_parser.enable_ident_normalization" , "false")
<datafusion.SessionConfig object at 0x3000c15ec0>
>>> from datafusion import SessionContext
>>> ctx = SessionContext()
>>> df = ctx.sql('create table x as select 1 "A"')
>>> df2 = ctx.sql('select * from x')
>>> df2
DataFrame()
+---+
| A |
+---+
| 1 |
+---+
>>> df2 = ctx.sql('select a from x')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: DataFusion error: SchemaError(FieldNotFound { field: Column { relation: None, name: "a" }, valid_fields: [Column { relation: Some(Bare { table: "x" }), name: "A" }] }, Some("")) |
Beta Was this translation helpful? Give feedback.
1 reply
-
passed sc, still not work >>> sc.set("datafusion.sql_parser.enable_ident_normalization" , "false")
<datafusion.SessionConfig object at 0x300078bf10>
>>> ctx = SessionContext(sc)
>>> df = ctx.sql('create table x as select 1 "A"')
>>> df2 = ctx.sql('select a from x')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: DataFusion error: SchemaError(FieldNotFound { field: Column { relation: None, name: "a" }, valid_fields: [Column { relation: Some(Bare { table: "x" }), name: "A" }] }, Some(""))
>>> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I run SQL on a parquet file's column name has both Upper and Lower letter, I had to use double quotation marks for them.
if I don't use double quotation marks, it reports following error.
sometimes, it's diffcult to write a sql when there are many those fieldnames.
Beta Was this translation helpful? Give feedback.
All reactions