[fix](be) Disambiguate duplicate JSONPath leaf columns - #67418
[fix](be) Disambiguate duplicate JSONPath leaf columns#674180AyanamiRei wants to merge 1 commit into
Conversation
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: JSON table-valued function schema inference used only the final key of each jsonpath as its output column name. Distinct paths such as $.left.id and $.right.id therefore both became id and failed the existing case-insensitive duplicate-column check. Detect duplicate leaf names and derive names from their path context, while preserving the existing leaf-only names for non-conflicting paths.
### Release note
JSON table-valued functions now expose path-qualified column names such as left_id and right_id when selected jsonpaths have duplicate leaf names.
### Check List (For Author)
- Test: BE unit test, regression test, and manual HTTP stream test
- BE unit test: NewJsonReaderSchemaTest.*
- Regression test: test_jsonpaths_duplicate_leaf with left/right controls and combined paths
- Manual test: http_stream loaded 2 rows with left_id, right_id, and city
- BE ASAN build, format check, and build hygiene
- Behavior changed: Yes. Conflicting JSONPath leaf names are qualified with path context.
- Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 16676 ms |
TPC-DS: Total hot run time: 81940 ms |
ClickBench: Total hot run time: 14.7 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
TPC-H: Total hot run time: 17190 ms |
TPC-DS: Total hot run time: 81436 ms |
ClickBench: Total hot run time: 14.7 s |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: JSON table-valued function schema inference used only the final key of each
jsonpathas its output column name. Distinct paths such as$.left.idand$.right.idtherefore both becameidand failed the existing case-insensitive duplicate-column check. Detect duplicate leaf names and derive names from their path context, while preserving the existing leaf-only names for non-conflicting paths.Release note
JSON table-valued functions now expose path-qualified column names such as
left_idandright_idwhen selected jsonpaths have duplicate leaf names.Check List (For Author)
NewJsonReaderSchemaTest.*test_jsonpaths_duplicate_leafwith left/right controls and combined pathshttp_streamloaded 2 rows withleft_id,right_id, andcitycore/types.hNOLINT and system-header conflicts