-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add support for json type in MongoDB #25089
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
|
|
e92c5c5 to
afd29df
Compare
34d06b9 to
19b069f
Compare
bfc9e97 to
c425186
Compare
| throws IOException | ||
| { | ||
| return Slices.wrappedBuffer(SORTED_MAPPER.writeValueAsBytes(value)); | ||
| } |
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.
Unused method
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.
Removed
| if (isJsonType(type)) { | ||
| String json = type.getSlice(block, position).toStringUtf8(); | ||
| try { | ||
| return Document.parse(json); |
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.
Use static import
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.
Added
|
Please add documentation entry as well in https://prestodb.io/docs/current/connector/mongodb.html |
Cherry-pick of trinodb/trino#8584 Co-authored-by: Yuya Ebihara <ebyhry@gmail.com> Co-authored-by: v-jizhang <z_jinlin@yahoo.com>
c425186 to
bdae204
Compare
@agrawalreetika I added a short section in the MongoDB docs explaining how json values are parsed. Not totally sure if that’s the right way—can you check it when you get a chance? @steveburnett is this the correct place for it? |
LGTM! @agrawalreetika, does this doc satisfy your request? |
steveburnett
left a comment
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! (docs)
Pull branch, local doc build, looks good. Thanks!
agrawalreetika
left a comment
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.
Thanks for the change. LGTM
Cherry-pick of trinodb/trino#8584
Description
This PR adds support for the json type in the MongoDB connector.
It’s based on #17336, which no longer being worked on.
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.