-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
IcebergInputSource : Add option to toggle case sensitivity while reading columns from iceberg catalog #16496
Conversation
@@ -92,6 +97,10 @@ public List<String> extractSnapshotDataFiles( | |||
if (snapshotTime != null) { | |||
tableScan = tableScan.asOfTime(snapshotTime.getMillis()); | |||
} | |||
//Default case sensitivity is true for Iceberg TableScanContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//Default case sensitivity is true for Iceberg TableScanContext | |
// Default case sensitivity is true for Iceberg TableScanContext |
@@ -92,6 +97,10 @@ public List<String> extractSnapshotDataFiles( | |||
if (snapshotTime != null) { | |||
tableScan = tableScan.asOfTime(snapshotTime.getMillis()); | |||
} | |||
//Default case sensitivity is true for Iceberg TableScanContext | |||
if (!isCaseSensitive()) { | |||
tableScan = tableScan.caseSensitive(isCaseSensitive()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of relying on the upstream default value of true, we can always set this unconditionally: tableScan = tableScan.caseSensitive(isCaseSensitive())
Thank you for the review @abhishekrb19 @asdf2014 |
Description
The column names defined in the iceberg catalog schema may not have the same case as those column names defined in the data files itself. Since the Iceberg table scan context enables case sensitivity by default, this can break filter calls during the scan operation if the column name cases don't match.
This PR adds config:
caseSensitive
to the Iceberg catalog spec ofIcebergInputSource
that toggles the case sensitivity. Setting this tofalse
fixes the scenario described above.This PR has: