[doc](be) Document JSONB path compatibility#63364
Draft
mrhhsg wants to merge 2 commits into
Draft
Conversation
### What problem does this PR solve?
Issue Number: DORIS-25580
Related PR: None
Problem Summary: Reject JSONB paths with fractional array indexes, case-mismatched last keyword, and dot-bracket array syntax so invalid paths fail instead of returning silent values.
### Release note
Reject invalid JSONB path expressions that were previously accepted silently.
### Check List (For Author)
- Test:
- Unit Test: ./run-be-ut.sh --run --filter=JsonbPathTest.*
- Regression test: ~/.codex/skills/doris-local-regression/scripts/doris-local-regression.sh run -d jsonb_p0 -s test_jsonb_invalid_path_syntax
- Manual test: ./build.sh --be
- Behavior changed: Yes. Invalid JSONB path expressions now return an error.
- Does this need documentation: No
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
### What problem does this PR solve? Issue Number: DORIS-25580 Related PR: apache#63364 Problem Summary: Keep the existing JSONB path compatibility behavior for dot-array paths, case-insensitive last, and numeric-prefix array indexes, and document these legacy supported forms to avoid accidental behavior changes. ### Release note None ### Check List (For Author) - Test: - No need to test (comment-only compatibility documentation; runtime behavior is reverted to existing semantics) - Behavior changed: No - Does this need documentation: No
Member
Author
|
/review |
Contributor
There was a problem hiding this comment.
Reviewed the current PR diff. I found no blocking issues.
Critical checkpoint conclusions:
- Goal and tests: The current PR documents existing JSONB path compatibility behavior without runtime changes. The stated no-test rationale is acceptable for a comment-only change.
- Scope and clarity: The effective diff is small and focused on
be/src/util/jsonb_document.hcomments. - Concurrency and lifecycle: Not applicable; no executable concurrency or lifecycle logic is changed in the effective PR diff.
- Configuration and compatibility: No new config or protocol/storage compatibility change is introduced. The comments explicitly preserve existing behavior.
- Parallel paths: The comments cover the root dot-array path, super-wildcard dot-array path, case-insensitive
last, and numeric-prefix array indexes in the parser paths where those behaviors exist. - Error handling, memory safety, transactions, observability: Not applicable for this comment-only change.
- Test result changes: No test/result files are part of the effective PR diff.
User focus: No additional user-provided review focus was specified.
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?
Related PR: None
Problem Summary: JSONB paths such as
$[1.5],$[Last],$[LAST], and$.[0]are accepted even though they differ from stricter MySQL-style path syntax. After evaluation, these forms are treated as existing Doris JSONB compatibility behavior/feature because rejecting them would be a behavior change and could impact existing users. This PR keeps the current behavior and adds comments to document the intentional compatibility.Release note
None
Check List (For Author)