Skip to content

[fix](json) Add . after in JSON path to support correct token parsing (#52543) - #52544

Merged
yiguolei merged 1 commit into
apache:branch-2.1from
mrhhsg:pick_52543
Jul 3, 2025
Merged

[fix](json) Add . after in JSON path to support correct token parsing (#52543)#52544
yiguolei merged 1 commit into
apache:branch-2.1from
mrhhsg:pick_52543

Conversation

@mrhhsg

Copy link
Copy Markdown
Member

Boost tokenizer requires explicit "." after "$" to correctly extract JSON path tokens. Without this, expressions like "$[0].key" cannot be properly split, causing issues in downstream logic. This commit ensures a "." is automatically added after "$" to maintain consistent token parsing behavior.

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #52543

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@mrhhsg
mrhhsg requested a review from yiguolei as a code ownerJune 30, 2025 11:05
@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@mrhhsgmrhhsg changed the title [fix](json) Add . after in JSON path to support correct token parsing[fix](json) Add . after in JSON path to support correct token parsing (#52543)Jun 30, 2025
@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run buildall

@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 28.57% (2/7) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.04% (10335/26470)
Line Coverage30.03% (85836/285804)
Region Coverage28.71% (44316/154357)
Branch Coverage25.42% (22673/89184)

@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run p0

@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run buildall

@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run p0

@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 10.71% (3/28) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.06% (10338/26470)
Line Coverage30.04% (85836/285783)
Region Coverage28.71% (44303/154334)
Branch Coverage25.42% (22669/89168)

Boost tokenizer requires explicit "." after "$" to correctly extract JSON path tokens.
Without this, expressions like "$[0].key" cannot be properly split, causing issues in downstream logic.
This commit ensures a "." is automatically added after "$" to maintain consistent token parsing behavior.
@mrhhsg

Copy link
Copy Markdown
MemberAuthor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 7.50% (3/40) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.05% (10338/26471)
Line Coverage30.04% (85840/285795)
Region Coverage28.70% (44293/154333)
Branch Coverage25.42% (22667/89166)

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actionsgithub-actionsBot added approved Indicates a PR has been approved by one committer. reviewed labels Jul 3, 2025
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@yiguolei
yiguolei merged commit 6404277 into apache:branch-2.1Jul 3, 2025
@mrhhsg
mrhhsg deleted the pick_52543 branch July 3, 2025 14:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by one committer.reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@mrhhsg@Thearas@hello-stephen@doris-robot@yiguolei