IcebergInputSource : Add option to toggle case sensitivity while reading columns from iceberg catalog#16496
Merged
a2l007 merged 4 commits intoapache:masterfrom May 31, 2024
Merged
Conversation
asdf2014
approved these changes
May 29, 2024
| if (snapshotTime != null) { | ||
| tableScan = tableScan.asOfTime(snapshotTime.getMillis()); | ||
| } | ||
| //Default case sensitivity is true for Iceberg TableScanContext |
Member
There was a problem hiding this comment.
Suggested change
| //Default case sensitivity is true for Iceberg TableScanContext | |
| // Default case sensitivity is true for Iceberg TableScanContext |
abhishekrb19
approved these changes
May 29, 2024
| } | ||
| //Default case sensitivity is true for Iceberg TableScanContext | ||
| if (!isCaseSensitive()) { | ||
| tableScan = tableScan.caseSensitive(isCaseSensitive()); |
Contributor
There was a problem hiding this comment.
Instead of relying on the upstream default value of true, we can always set this unconditionally: tableScan = tableScan.caseSensitive(isCaseSensitive())
Contributor
Author
|
Thank you for the review @abhishekrb19 @asdf2014 |
basapuram-kumar
pushed a commit
to acceldata-io/druid
that referenced
this pull request
Jun 19, 2025
…ing columns from iceberg catalog (apache#16496) * Toggle case sensitivity while reading columns from iceberg * Fix tests * Drop case check and set unconditionally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
caseSensitiveto the Iceberg catalog spec ofIcebergInputSourcethat toggles the case sensitivity. Setting this tofalsefixes the scenario described above.This PR has: