-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add docs for json_table #23761
base: master
Are you sure you want to change the base?
Add docs for json_table #23761
Conversation
60f819c
to
5628d72
Compare
5628d72
to
c6447e3
Compare
6ca7271
to
de8a086
Compare
de8a086
to
8766f0e
Compare
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.
@michaeleby1 great job! It will be very useful to have json_table
finally documented.
I left a few comments.
Also, I'm not sure if it's clear to the reader how to use json_table
in the context of a query. json_table
is a lateral relation, and typically it will be used as part of a join:
SELECT *
FROM orders, json_table(...)
It clarifies where the json_input
and the PASSING
parameters come from.
307f899
to
bdf880d
Compare
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.
Hi @michaeleby1 and thank you for applying the comments.
There is one more issue regarding the taxonomy.
In SQL, json_table
is not a table function. It is a clause, similar to lateral
or unnest
. It does not follow the syntactic rules for table functions.
As you noticed, json_table
is indeed implemented using the table functions framework, but that should be considered an implementation detail.
That said, I wonder where json_table
belongs in the docs.
I think we can keep it in the functions/json
section but reword so that we call it a clause, not a table function. Keeping it there would be convenient to the reader.
Also, json_table
should be mentioned in the SELECT
section, along with unnest
and lateral
.
Co-authored-by: Michael Eby <[email protected]>
bdf880d
to
b69b365
Compare
@michaeleby1 yes, that is what I meant. |
Description
Additional context and related issues
Replaces #20338
First released in 435 with #18017
Fix for being able to test it at all is in 436 - #20122
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.