You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ambiguous column error you're encountering when using the COPY INTO command with case-sensitive columns (c1 and C1) is likely due to the logic at line 301 in bind_context.rs. This logic checks if there are multiple tables in the metadata that are not sources of an index, and if so, it raises a SemanticError indicating that the table of the internal column is ambiguous:
if tables.len() > 1{returnErr(ErrorCode::SemanticError(format!("The table of the internal column `{}` is ambiguous",
column_binding.internal_column.column_name())));}
This error can occur if the column names are not being correctly distinguished based on case sensitivity during the binding process [1].
To address this issue, you may need to ensure that the normalize_identifier function correctly handles case sensitivity for both quoted and unquoted identifiers. The normalize_identifier function is used to normalize identifiers based on the case sensitivity settings defined in the NameResolutionContext:
You should verify that the NameResolutionContext is configured correctly for your use case, ensuring that quoted identifiers are treated as case-sensitive and unquoted identifiers are handled according to your requirements [2].
If the issue persists, you might need to review the logic in the COPY INTO command's processing of Parquet files to ensure that it correctly handles case-sensitive column names. The ParquetCopySource struct and its methods (event, process, and async_process) are responsible for processing Parquet files during the COPY INTO operation [3][4][5].
By ensuring that the case sensitivity settings and the identifier normalization logic are correctly implemented, you should be able to resolve the ambiguous column error.
Search before asking
Version
v1.2.635-nightly
What's Wrong?
When trying to load data via COPY INTO from a parquet file with case sensitive columns, an ambiguous column error is reported. Looks to be from
databend/src/query/sql/src/planner/binder/bind_context.rs
Line 301 in 2c41faf
The parquet file contains columns such as
c1
andC1
which exist within the target table.How to Reproduce?
Sorry not easy for me to write a script to replicate, but easy to describe
c1
&C1
create table t_sensitive ("c1" int, "C1" int);
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: