Uh oh!
There was an error while loading. Please reload this page.
[fix](be) Reject super wildcard path in json keys - #63300
Conversation
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: Fixes Jira DORIS-25570. json_keys/jsonb_keys rejected ordinary wildcard paths but allowed super wildcard paths such as $**.a to fall through and return NULL. The function only supports reading keys from a single object, so super wildcard paths should fail with the same INVALID_JSON_PATH error as other wildcard paths. ### Release note Reject unsupported super wildcard JSON paths in json_keys/jsonb_keys instead of returning NULL. ### Check List (For Author) - Test: Unit Test / Regression test / Static check - Unit Test: ./run-be-ut.sh --run --filter=FunctionJsonbTEST.JsonbKeysRejectSuperWildcardPath - Regression test: Added regression-test/suites/jsonb_p0/test_jsonb_keys_invalid_path.groovy (not run locally; no FE/BE cluster was listening on configured regression ports) - Static check: build-support/check-format.sh - Static check: build-support/run-clang-tidy.sh --build-dir be/ut_build_ASAN (failed due to pre-existing function_jsonb.cpp complexity diagnostics and toolchain header/NOLINTEND errors) - Behavior changed: Yes (json_keys/jsonb_keys now return INVALID_JSON_PATH for $** paths instead of NULL) - Does this need documentation: No
hello-stephen
commented
May 15, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
mrhhsg
commented
May 15, 2026
/review |
There was a problem hiding this comment.
Automated review summary for PR 63300 at 7aabb3f.
No blocking issues found.
Critical checkpoint conclusions:
- Goal and proof: The PR aims to reject unsupported
**JSON path tokens injson_keys/jsonb_keys. The implementation addsis_supper_wildcard()checks in both const-path and non-const-path branches, and adds BE unit/regression coverage for both paths. - Scope: The code change is small and focused on the existing wildcard rejection logic.
- Concurrency: No new concurrency, shared state, locks, or lifecycle-sensitive objects are introduced.
- Lifecycle/static initialization: No new static/global initialization dependency is introduced.
- Configuration: No configuration item is added.
- Compatibility/behavior: This is an intentional user-visible behavior change from returning NULL to returning
INVALID_JSON_PATHfor unsupported super-wildcard paths. - Parallel paths:
jsonb_keysis an alias ofjson_keys, so the BE change covers both names through the shared implementation. Existing wildcard rejection in the related JSON modification path already checksis_supper_wildcard(). - Conditional checks: The added condition directly extends the existing unsupported wildcard validation to the parser's super-wildcard flag.
- Tests: A BE unit test covers const and non-const path execution, and a regression test covers SQL const and query-derived path expressions. I attempted
./run-be-ut.sh --run --filter=FunctionJsonbTEST.JsonbKeysRejectSuperWildcardPath, but it timed out during first-timecontrib/apache-orcsubmodule cloning before executing the test. - Observability: No additional observability appears necessary for this validation-only change.
- Transaction/persistence/data writes: Not applicable.
- FE/BE variable passing: Not applicable.
- Performance: The added checks are constant-time after path parsing and do not add meaningful overhead.
- User focus points: No additional user-provided review focus was present.
Residual risk: The regression test was not executed in this review environment, and the targeted BE unit test could not be completed because dependency initialization exceeded the command timeout.
mrhhsg
commented
May 15, 2026
run buildall |
hello-stephen
commented
May 15, 2026
TPC-H: Total hot run time: 31190 ms |
hello-stephen
commented
May 15, 2026
TPC-DS: Total hot run time: 169150 ms |
hello-stephen
commented
May 15, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: `json_keys`/`jsonb_keys` rejected ordinary wildcard paths but allowed super wildcard paths such as $**.a to fall through and return NULL. The function only supports reading keys from a single object, so super wildcard paths should fail with the same INVALID_JSON_PATH error as other wildcard paths. ### Release note Reject unsupported super wildcard JSON paths in json_keys/jsonb_keys instead of returning NULL. ### Check List (For Author) - Test: Unit Test / Regression test / Static check - Unit Test: ./run-be-ut.sh --run --filter=FunctionJsonbTEST.JsonbKeysRejectSuperWildcardPath - Regression test: Added regression-test/suites/jsonb_p0/test_jsonb_keys_invalid_path.groovy (not run locally; no FE/BE cluster was listening on configured regression ports) - Static check: build-support/check-format.sh - Static check: build-support/run-clang-tidy.sh --build-dir be/ut_build_ASAN (failed due to pre-existing function_jsonb.cpp complexity diagnostics and toolchain header/NOLINTEND errors) - Behavior changed: Yes (json_keys/jsonb_keys now return INVALID_JSON_PATH for $** paths instead of NULL) - Does this need documentation: No
### What problem does this PR solve? Issue Number: None Related PR: None Problem Summary: `json_keys`/`jsonb_keys` rejected ordinary wildcard paths but allowed super wildcard paths such as $**.a to fall through and return NULL. The function only supports reading keys from a single object, so super wildcard paths should fail with the same INVALID_JSON_PATH error as other wildcard paths. ### Release note Reject unsupported super wildcard JSON paths in json_keys/jsonb_keys instead of returning NULL. ### Check List (For Author) - Test: Unit Test / Regression test / Static check - Unit Test: ./run-be-ut.sh --run --filter=FunctionJsonbTEST.JsonbKeysRejectSuperWildcardPath - Regression test: Added regression-test/suites/jsonb_p0/test_jsonb_keys_invalid_path.groovy (not run locally; no FE/BE cluster was listening on configured regression ports) - Static check: build-support/check-format.sh - Static check: build-support/run-clang-tidy.sh --build-dir be/ut_build_ASAN (failed due to pre-existing function_jsonb.cpp complexity diagnostics and toolchain header/NOLINTEND errors) - Behavior changed: Yes (json_keys/jsonb_keys now return INVALID_JSON_PATH for $** paths instead of NULL) - Does this need documentation: No
What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary:
json_keys/jsonb_keysrejected ordinary wildcard paths but allowed super wildcard paths such as $**.a to fall through and return NULL. The function only supports reading keys from a single object, so super wildcard paths should fail with the same INVALID_JSON_PATH error as other wildcard paths.Release note
Reject unsupported super wildcard JSON paths in json_keys/jsonb_keys instead of returning NULL.
Check List (For Author)