[GLUTEN-10521][VL] Fall back to_json function for uppercase struct field name#10523
Merged
zml1206 merged 4 commits intoapache:mainfrom Aug 26, 2025
Merged
[GLUTEN-10521][VL] Fall back to_json function for uppercase struct field name#10523zml1206 merged 4 commits intoapache:mainfrom
to_json function for uppercase struct field name#10523zml1206 merged 4 commits intoapache:mainfrom
Conversation
…s uppercase field name
|
Run Gluten Clickhouse CI on x86 |
Contributor
Author
philo-he
reviewed
Aug 26, 2025
Member
philo-he
left a comment
There was a problem hiding this comment.
Just some suggestions. Thanks.
|
|
||
| val NOT_SUPPORT_UPPERCASE_STRUCT: String = | ||
| s"${ExpressionNames.TO_JSON} with 'spark.sql.caseSensitive = false' and has struct type" + | ||
| s" which contains uppercase field name is not supported in Velox" |
Member
There was a problem hiding this comment.
Suggestion:
"When 'spark.sql.caseSensitive = false', ${ExpressionNames.TO_JSON} produces unexpected result for struct field with uppercase name."
| hasComplexExpressions(plan.expressions, threshold) | ||
| } | ||
|
|
||
| def hasUppercaseFieldsStruct(dataType: DataType): Boolean = { |
Member
There was a problem hiding this comment.
Suggestion: hasUppercaseStructFieldName
| def hasUppercaseFieldsStruct(dataType: DataType): Boolean = { | ||
| dataType match { | ||
| case StructType(fields) => | ||
| fields.exists(field => field.name.toLowerCase(Locale.ROOT) != field.name) |
Member
There was a problem hiding this comment.
Suggestion:
fields.exists(_.name.exists(_.isUpper))
|
Run Gluten Clickhouse CI on x86 |
to_json function for uppercase struct field name
Contributor
Author
|
Thanks for review @philo-he merge into main. |
wForget
pushed a commit
to wForget/gluten
that referenced
this pull request
Sep 23, 2025
…field name (apache#10523) (cherry picked from commit ce75c4f)
Closed
wForget
pushed a commit
to wForget/gluten
that referenced
this pull request
Oct 15, 2025
…field name (apache#10523) (cherry picked from commit ce75c4f)
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.
What changes are proposed in this pull request?
Currently, gluten uses spark.sql.caseSensitive to determine whether to convert struct field names to lowercase and pass the converted field names to velox. This results in all struct field names becoming lowercase when spark.sql.caseSensitive is false. I haven't found a suitable solution to this problem for the current design, so let's fall back first.
How was this patch tested?
unit test.