-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Reintroduced json_extract to generate canonicalized output #24879
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
Merged
duxiao1212
merged 1 commit into
prestodb:master
from
duxiao1212:add-json-extract-canonicalized-back
Apr 7, 2025
Merged
Reintroduced json_extract to generate canonicalized output #24879
duxiao1212
merged 1 commit into
prestodb:master
from
duxiao1212:add-json-extract-canonicalized-back
Apr 7, 2025
Conversation
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
duxiao1212
commented
Apr 7, 2025
presto-common/src/main/java/com/facebook/presto/common/function/SqlFunctionProperties.java
Show resolved
Hide resolved
Contributor
|
@duxiao1212 is there a way to verify the fix is working? |
Contributor
I shadowed the previous version with the equals fix and confirmed that it fixed the issue. |
Contributor
|
@duxiao1212 please add more details to the PR description about why the change was reverted, the root cause, and how this fixes it. |
rschlussel
approved these changes
Apr 7, 2025
Leziak
pushed a commit
to Leziak/presto
that referenced
this pull request
Apr 9, 2025
# This is the 1st commit message: [native] Add a test group for async data cache e2e tests. # This is the commit message prestodb#2: [native] Advance velox. # This is the commit message prestodb#3: Fix error when describing a nonexistent table # This is the commit message prestodb#4: [native] test modification. # This is the commit message prestodb#5: Changes to enable ssl/tls in hms Co-authored-by: Arin Mathew <[email protected]> Changes to move ssl related properties to seperate class # This is the commit message prestodb#6: [native] Add tests for UUID type # This is the commit message prestodb#7: Reintroduced json_extract to generate canonicalized output (prestodb#24879) ## Description The original pull request [prestodb#24614](prestodb#24614) incorrectly compares canonicalizedJsonExtract and legacyJsonCast in the equals function of an object. This issue can be seen in the code [here](https://github.com/prestodb/presto/pull/24614/files#diff-e921c5d186f9d5daa836bc7330f52caf8c1b84d19cf42288d5a8a7c9a6d2a5d5R156). As a result, whenever a SQL function requires caching, the cache is never hit, leading to the creation of new SQL function objects repeatedly. This behavior eventually causes an OOM error in the JVM metaspace. and eventually this error led to UER SEV. After the problematic comparison was updated and tested through shadow cluster by @rschlussel , we are confident that the issue has been resolved in this PR. Therefore, we plan to bring back the json canonicalized extract ## Motivation and Context Reintroduced json_extract to generate canonicalized output ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> low impact ## Test Plan <!---Please fill in how you tested your change--> N/A ## Contributor checklist - [x] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [x] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [x] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [x] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [x] Adequate tests were added if applicable. - [x] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == NO RELEASE NOTE == ``` # This is the commit message prestodb#8: Reuse JoinType in IndexJoinNode Reuse JoinType instead of creating IndexJoinNode's own. JoinType is already part of Prestissimo protocol. Adding IndexJoinNode with another JoinType would cause naming conflict. # This is the commit message prestodb#9: Add jaro-winkler implementation, documentation and tests # This is the commit message prestodb#10: Add documentation for Iceberg support in PrestoCPP # This is the commit message prestodb#11: Add memory pool debug regex # This is the commit message prestodb#12: doc on hive csv limitations # This is the commit message prestodb#13: Add support for S3 WebIdentity authentication # This is the commit message prestodb#14: use com.facebook.airlift:security in presto-hive-metastore # This is the commit message prestodb#15: [native] Advance Velox # This is the commit message prestodb#16: [native] Add protocol for index lookup join plan # This is the commit message prestodb#17: [native] Add sidecar and sidecar plugin documentation
pradeepvaka
pushed a commit
to pradeepvaka/presto
that referenced
this pull request
Apr 11, 2025
…24879) ## Description The original pull request [prestodb#24614](prestodb#24614) incorrectly compares canonicalizedJsonExtract and legacyJsonCast in the equals function of an object. This issue can be seen in the code [here](https://github.com/prestodb/presto/pull/24614/files#diff-e921c5d186f9d5daa836bc7330f52caf8c1b84d19cf42288d5a8a7c9a6d2a5d5R156). As a result, whenever a SQL function requires caching, the cache is never hit, leading to the creation of new SQL function objects repeatedly. This behavior eventually causes an OOM error in the JVM metaspace. and eventually this error led to UER SEV. After the problematic comparison was updated and tested through shadow cluster by @rschlussel , we are confident that the issue has been resolved in this PR. Therefore, we plan to bring back the json canonicalized extract ## Motivation and Context Reintroduced json_extract to generate canonicalized output ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> low impact ## Test Plan <!---Please fill in how you tested your change--> N/A ## Contributor checklist - [x] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [x] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [x] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [x] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [x] Adequate tests were added if applicable. - [x] CI passed. ## Release Notes Please follow [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines) and fill in the release notes below. ``` == NO RELEASE NOTE == ```
13 tasks
21 tasks
This was referenced May 30, 2025
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.
Description
The original pull request #24614 incorrectly compares canonicalizedJsonExtract and legacyJsonCast in the equals function of an object. This issue can be seen in the code here.
As a result, whenever a SQL function requires caching, the cache is never hit, leading to the creation of new SQL function objects repeatedly. This behavior eventually causes an OOM error in the JVM metaspace. and eventually this error led to UER SEV.
After the problematic comparison was updated and tested through shadow cluster by @rschlussel , we are confident that the issue has been resolved in this PR. Therefore, we plan to bring back the json canonicalized extract
Motivation and Context
Reintroduced json_extract to generate canonicalized output
Impact
low impact
Test Plan
N/A
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.