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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: branch-2.1
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jun 7, 2025

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-actions bot requested a review from yiguolei as a code owner June 7, 2025 13:17
@Thearas
Copy link
Contributor

Thearas commented Jun 7, 2025

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?

@dataroaring dataroaring closed this Jun 7, 2025
@dataroaring dataroaring reopened this Jun 7, 2025
@Thearas
Copy link
Contributor

Thearas commented Jun 7, 2025

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 39.04% (10328/26457)
Line Coverage 30.04% (85820/285654)
Region Coverage 28.71% (44287/154270)
Branch Coverage 25.42% (22658/89126)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.54% (19427/26061)
Line Coverage 69.27% (196602/283810)
Region Coverage 66.81% (119964/179559)
Branch Coverage 59.89% (60340/100758)

@mrhhsg
Copy link
Member

mrhhsg commented Jun 8, 2025

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 39.04% (10328/26457)
Line Coverage 30.04% (85822/285654)
Region Coverage 28.71% (44288/154270)
Branch Coverage 25.43% (22662/89126)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.69% (19466/26061)
Line Coverage 69.45% (197092/283810)
Region Coverage 66.94% (120204/179559)
Branch Coverage 59.97% (60423/100758)

@mrhhsg mrhhsg force-pushed the auto-pick-51516-branch-2.1 branch from c468c18 to 0a2be34 Compare June 8, 2025 06:35
@mrhhsg
Copy link
Member

mrhhsg commented Jun 8, 2025

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 39.04% (10328/26457)
Line Coverage 30.05% (85825/285654)
Region Coverage 28.70% (44281/154270)
Branch Coverage 25.43% (22662/89126)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (1/1) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.56% (19430/26061)
Line Coverage 69.29% (196650/283810)
Region Coverage 66.78% (119916/179559)
Branch Coverage 59.93% (60386/100758)

Sign up for free to 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.

5 participants