-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[fix](function) JSON_EXTRACT_STRING should return NULL instead of the string 'null' when encountering a NULL value #51516
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
Conversation
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
run buildall |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by anyone and no changes requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
TPC-H: Total hot run time: 33838 ms
|
TPC-DS: Total hot run time: 193101 ms
|
ClickBench: Total hot run time: 29.22 s
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
62c2ab5
90dd2af
to
62c2ab5
Compare
run buildall |
TPC-H: Total hot run time: 33946 ms
|
TPC-DS: Total hot run time: 192988 ms
|
… string 'null' when encountering a NULL value
62c2ab5
to
c78210d
Compare
run buildall |
TPC-H: Total hot run time: 33819 ms
|
TPC-DS: Total hot run time: 185545 ms
|
ClickBench: Total hot run time: 29.33 s
|
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
… 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.
… 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.
…stead of the string 'null' when encountering a NULL value #51516 (#51565) Cherry-picked from #51516 --------- Co-authored-by: Jerry Hu <[email protected]>
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.
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)