Skip to content

branch-2.1: [fix](function) JSON_EXTRACT_STRING should return NULL instead of the string 'null' when encountering a NULL value #51516 - #51566

Merged
yiguolei merged 2 commits into
branch-2.1from
auto-pick-51516-branch-2.1
Jun 13, 2025
Merged

branch-2.1: [fix](function) JSON_EXTRACT_STRING should return NULL instead of the string 'null' when encountering a NULL value #51516#51566
yiguolei merged 2 commits into
branch-2.1from
auto-pick-51516-branch-2.1

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #51516

… string 'null' when encountering a NULL value (#51516)
### What problem does this PR solve?
Previously, when JSON_EXTRACT_STRING encountered a NULL input value or
path, it returned the string "null" instead of a proper SQL NULL value.
This behavior could lead to incorrect query results and confusion in
downstream processing that expects NULL to be represented as an actual
null value rather than a literal string.
This commit adjusts the logic to ensure that JSON_EXTRACT_STRING returns
NULL in such cases, aligning with SQL semantics and improving
compatibility with systems that rely on strict null-handling behavior.
@github-actions
github-actionsBot requested a review from yiguolei as a code ownerJune 7, 2025 13:17
@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?

@Thearas

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.04% (10328/26457)
Line Coverage30.04% (85820/285654)
Region Coverage28.71% (44287/154270)
Branch Coverage25.42% (22658/89126)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage74.54% (19427/26061)
Line Coverage69.27% (196602/283810)
Region Coverage66.81% (119964/179559)
Branch Coverage59.89% (60340/100758)

@mrhhsg

Copy link
Copy Markdown
Member

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.04% (10328/26457)
Line Coverage30.04% (85822/285654)
Region Coverage28.71% (44288/154270)
Branch Coverage25.43% (22662/89126)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage74.69% (19466/26061)
Line Coverage69.45% (197092/283810)
Region Coverage66.94% (120204/179559)
Branch Coverage59.97% (60423/100758)

@mrhhsg
mrhhsgforce-pushed the auto-pick-51516-branch-2.1 branch from c468c18 to 0a2be34CompareJune 8, 2025 06:35
@mrhhsg

Copy link
Copy Markdown
Member

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage39.04% (10328/26457)
Line Coverage30.05% (85825/285654)
Region Coverage28.70% (44281/154270)
Branch Coverage25.43% (22662/89126)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage74.56% (19430/26061)
Line Coverage69.29% (196650/283810)
Region Coverage66.78% (119916/179559)
Branch Coverage59.93% (60386/100758)

@yiguolei
yiguolei merged commit 18d2f93 into branch-2.1Jun 13, 2025
@github-actions
github-actionsBot deleted the auto-pick-51516-branch-2.1 branch June 13, 2025 03:07
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

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