[VL] Respect caseSensitiveAnalysis in IcebergScanTransformer metadata-column handling - #12726
Open
sabbasani wants to merge 4 commits into
Open
[VL] Respect caseSensitiveAnalysis in IcebergScanTransformer metadata-column handling#12726sabbasani wants to merge 4 commits into
sabbasani wants to merge 4 commits into
Conversation
|
Run Gluten Clickhouse CI on x86 |
|
Run Gluten Clickhouse CI on x86 |
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.
This PR fixes case-sensitive column-name handling in IcebergScanTransformer.
IcebergScanTransformer used unconditional .toLowerCase(Locale.ROOT) when handling schema and input-file-related metadata column names. This does not respect Spark's spark.sql.caseSensitive configuration and can cause mixed-case user columns to collide with metadata-related column names when spark.sql.caseSensitive=true.
This PR replaces the unconditional lowercasing with the existing canonical helper:
ConverterUtils.normalizeColName
normalizeColName respects SQLConf.get.caseSensitiveAnalysis:
when spark.sql.caseSensitive=true, the original column casing is preserved;
when spark.sql.caseSensitive=false, column names continue to be lowercased as before.
What changes are proposed in this pull request?
How was this patch tested?
Added regression coverage for both the general case-sensitive execution path and the Iceberg-specific path.
FallbackSuite
Tests cover:
case-sensitive top-level column access with native execution;
native aggregation with GROUP BY;
native join execution;
default case-insensitive behavior remaining unchanged.
Results:
FallbackSuite
21 tests
21 passed
0 failed
0 errors
The tests compare Gluten results against vanilla Spark and also verify that native Gluten/Velox transformer nodes are present.
VeloxIcebergSuite
Added coverage for:
Iceberg scan with spark.sql.caseSensitive=true;
input_file_name() with case-sensitive mode enabled;
a mixed-case data column such as Input_File_Name not being confused with metadata-related columns;
case-sensitive metadata-column handling.
Results:
VeloxIcebergSuite
19 tests
19 passed
0 failed
0 errors
Was this patch authored or co-authored using generative AI tooling?
Yes, AI assistance.