-
Notifications
You must be signed in to change notification settings - Fork 186
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
[FEAT]: [SQL] struct subscript and json_query #2891
[FEAT]: [SQL] struct subscript and json_query #2891
Conversation
CodSpeed Performance ReportMerging #2891 will not alter performanceComparing Summary
|
…-and-subscript-sql
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.
Looking pretty good!
// TODO | ||
fn register(parent: &mut SQLFunctions) { | ||
parent.add_fn("map_get", MapGet); | ||
parent.add_fn("map_extract", MapGet); |
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.
Is this an alias to maintain ANSI/postgres compatibility?
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.
AFAIK, ANSI doesn't really have any standard for what you can/cant call your functions. I mostly added the alias because I've seen it in other db systems (such as duckdb).
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.
Looks good! just one small comment
Ok(daft_functions::list::slice(expr, lower, upper)) | ||
} | ||
_ => { | ||
unsupported_sql_err!("slice with only one bound not yet supported"); |
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 believe we do currently support it. If lower is not specified, it should be 0. If upper is not specified, we can pass in a null literal to daft_functions::list::slice
and it will work properly
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.
yeah, just havent gotten around to implementing it yet. will follow up with support for it.
Co-authored-by: Jay Chia <17691182+jaychia@users.noreply.github.com>
adds nested access for structs and maps, as well as
json_query
function