-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: support in-memory SQL arrays of JSON #70041
Conversation
804a6a6
to
551e7db
Compare
out of curiosity, how do we handle the example from #59427 with this change? |
551e7db
to
1d3ecfa
Compare
@@ -2452,8 +2452,6 @@ func IsStringType(t *T) bool { | |||
// the issue number should be included in the error report to inform the user. | |||
func IsValidArrayElementType(t *T) (valid bool, issueNum int) { |
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.
seems like we can remove this function now. unless you think it will be useful to track other types?
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.
I thought of this, but I figured if we do end up needing something like this again we'll have to remember both of these places and be sad. I think it's fine to leave this in.
The behavior is exactly the same. I think Andrew's explanation on that issue makes sense - we can't auto-cast arrays of JSON to json-array. |
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.
nice quick win, thank you!
4e05409
to
9ebe52a
Compare
This commit adds support for SQL arrays of JSON in memory. This allows functions like `array_agg` to work against JSON objects, which is useful for compatibility. Notably, this commit does not add support for storing JSON arrays in table columns. Release note (sql change): add support for SQL arrays containing JSON for in-memory processing. This does not add support for storing SQL arrays of JSON in tables.
9ebe52a
to
25e38dd
Compare
TFTRs 😎 bors r+ |
Build succeeded: |
refs #23468
refs #69010
This commit adds support for SQL arrays of JSON in memory. This allows
functions like
array_agg
to work against JSON objects, which is usefulfor compatibility.
Notably, this commit does not add support for storing JSON arrays in
table columns.
Release note (sql change): add support for SQL arrays containing JSON
for in-memory processing. This does not add support for storing SQL
arrays of JSON in tables.