-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Upgrade sqlparser-rs to 0.51.0, support new interval logic from sqlparse-rs
#12222
Changes from all commits
179be76
edf318b
ab88318
6bba073
268d478
8fe6a2f
5ad18e0
e7ed21e
ce3425a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -495,11 +495,17 @@ fn test_table_references_in_plan_to_sql() { | |
assert_eq!(format!("{}", sql), expected_sql) | ||
} | ||
|
||
test("catalog.schema.table", "SELECT catalog.\"schema\".\"table\".id, catalog.\"schema\".\"table\".\"value\" FROM catalog.\"schema\".\"table\""); | ||
test("schema.table", "SELECT \"schema\".\"table\".id, \"schema\".\"table\".\"value\" FROM \"schema\".\"table\""); | ||
test( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a driveby (unrelated) cleanup, right? (this is fine I am just verifying my understanding) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was necessary to get tests to pass, I assume it came from some other change in sqlparser, I didn't look too hard. But it's not just cosmetic. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this mostly changes |
||
"catalog.schema.table", | ||
r#"SELECT "catalog"."schema"."table".id, "catalog"."schema"."table"."value" FROM "catalog"."schema"."table""#, | ||
); | ||
test( | ||
"schema.table", | ||
r#"SELECT "schema"."table".id, "schema"."table"."value" FROM "schema"."table""#, | ||
); | ||
test( | ||
"table", | ||
"SELECT \"table\".id, \"table\".\"value\" FROM \"table\"", | ||
r#"SELECT "table".id, "table"."value" FROM "table""#, | ||
); | ||
} | ||
|
||
|
@@ -521,10 +527,10 @@ fn test_table_scan_with_no_projection_in_plan_to_sql() { | |
|
||
test( | ||
"catalog.schema.table", | ||
"SELECT * FROM catalog.\"schema\".\"table\"", | ||
r#"SELECT * FROM "catalog"."schema"."table""#, | ||
); | ||
test("schema.table", "SELECT * FROM \"schema\".\"table\""); | ||
test("table", "SELECT * FROM \"table\""); | ||
test("schema.table", r#"SELECT * FROM "schema"."table""#); | ||
test("table", r#"SELECT * FROM "table""#); | ||
} | ||
|
||
#[test] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1355,6 +1355,16 @@ SELECT date_part('second', arrow_cast('23:32:50.123456789'::time, 'Time64(Nanose | |
---- | ||
50.123456789 | ||
|
||
query R | ||
select extract(second from '2024-08-09T12:13:14') | ||
---- | ||
14 | ||
|
||
query R | ||
select extract(seconds from '2024-08-09T12:13:14') | ||
---- | ||
14 | ||
|
||
query R | ||
SELECT extract(second from arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) | ||
---- | ||
|
@@ -1381,6 +1391,11 @@ SELECT extract(microsecond from arrow_cast('23:32:50.123456789'::time, 'Time64(N | |
---- | ||
50123456.789000005 | ||
|
||
query R | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 |
||
SELECT extract(us from arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) | ||
---- | ||
50123456.789000005 | ||
|
||
query R | ||
SELECT date_part('nanosecond', arrow_cast('23:32:50.123456789'::time, 'Time64(Nanosecond)')) | ||
---- | ||
|
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.
It is great to remove all this stuff from the sql planner (as it is now in the parser)