[fix](fe) Preserve inferred JSON column name casing - #67411
Open
0AyanamiRei wants to merge 1 commit into
Open
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: JSON schema inference lowercased field names before creating the table-valued function schema, while JSON readers match object keys case-sensitively. Uppercase keys therefore appeared as queryable lowercase columns but were silently materialized as NULL. Preserve the inferred key casing for JSON only, while retaining case-insensitive duplicate detection and the existing lowercase behavior for other file formats.
### Release note
JSON table-valued functions now read inferred mixed-case and uppercase keys without silently producing NULL values.
### Check List (For Author)
- Test: Regression test and manual tests
- Regression test: test_json_uppercase_keys (raw and jsonpaths control)
- Manual test: File Scanner V2, legacy scanner, and http_stream returned the two expected rows
- Manual compatibility test: CSV inferred column names remained lowercase
- Behavior changed: Yes. Inferred JSON field names preserve source casing.
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
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 problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: JSON schema inference lowercased field names before creating the table-valued function schema, while JSON readers match object keys case-sensitively. Uppercase keys therefore appeared as queryable lowercase columns but were silently materialized as NULL. Preserve the inferred key casing for JSON only, while retaining case-insensitive duplicate detection and the existing lowercase behavior for other file formats.
Release note
JSON table-valued functions now read inferred mixed-case and uppercase keys without silently producing NULL values.
Check List (For Author)
test_json_uppercase_keys(raw and jsonpaths control)http_streamreturned the two expected rows