-
Notifications
You must be signed in to change notification settings - Fork 1.5k
schema_force_view_type
configuration not working for CREATE EXTERNAL TABLE
#14909
New issue
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
Comments
take |
Submitted the PR for review. |
Thank you @zhuqi-lucas If you change the example slightly (so the column names are not explicitly listed) then the type is correctly set to Utf8View > CREATE EXTERNAL TABLE IF NOT EXISTS lineitem STORED AS parquet
LOCATION '/Users/andrewlamb/Software/datafusion/benchmarks/data/tpch_sf10/lineitem';
0 row(s) fetched.
Elapsed 0.010 seconds.
> select arrow_typeof(l_comment) from lineitem limit 1;
+----------------------------------+
| arrow_typeof(lineitem.l_comment) |
+----------------------------------+
| Utf8View |
+----------------------------------+
1 row(s) fetched.
Elapsed 0.015 seconds. I think what is happening is that the SQL type datafusion/datafusion/sql/src/planner.rs Line 561 in c0d53ad
So when the table is created with an explicit type it is set to Utf8 However, when the types are read directly from Parquet the types is inferred as Utf8View |
Huge kudos to @zhuqi-lucas for trying to fix this in After some research, I think we have concluded the real reason this isn't working is If we need a shorter term workaround for this problem, I suggest we start with a config settings: |
Describe the bug
schema_force_view_type
configuration said:Reference: https://datafusion.apache.org/user-guide/configs.html
I tried the following script within
datafusion-cli
The data type is
Utf8
insteadUtf8View
To Reproduce
No response
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: