-
Notifications
You must be signed in to change notification settings - Fork 543
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
PartiQL queries in Redshift #1534
base: main
Are you sure you want to change the base?
Conversation
tests/sqlparser_redshift.rs
Outdated
#[test] | ||
fn test_redshift_json_path() { | ||
let sql = "SELECT cust.c_orders[0].o_orderkey FROM customer_orders_lineitem"; | ||
let select = redshift().verified_only_select(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.
Could we use let dialect = all_dialects_where(|d| d.supports_partiql())
for the tests? thinking so any dialect that gets this feature can potentially reuse the same tests
src/ast/query.rs
Outdated
/// Optional PartiQL JsonPath: <https://partiql.org/dql/from.html> | ||
partiql: Option<JsonPath>, |
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.
Maybe we can call this json_path
to be generic (in the doc we mention partiql as one example)?
tests/sqlparser_redshift.rs
Outdated
|
||
#[test] | ||
fn test_parse_json_path_from() { | ||
let select = redshift().verified_only_select("SELECT * FROM src[0].a AS a"); |
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.
Could we add a test for something containing a qualified name e.g. a.b.c[0].d
(it wasn't clear from the code how that's represented or rejected if its not valid partiql)?
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! cc @alamb
This PR adds support for parsing PartiQL queries in Redshift