-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(backend): add temporal literal tests
- Loading branch information
Showing
29 changed files
with
121 additions
and
15 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/bigquery-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('2023-04-07' AS DATE) AS `datetime_date_2023_ 4_ 7` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/bigquery-time/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06.230136' AS TIME) AS `datetime_time_4_ 5_ 6_ 230136` |
2 changes: 2 additions & 0 deletions
2
.../backends/tests/snapshots/test_temporal/test_temporal_literals/bigquery-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('2023-04-07 04:05:06.230136' AS DATETIME) AS `datetime_datetime_2023_ 4_ 7_ 4_ 5_ 6_ 230136` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/clickhouse-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
toDate('2023-04-07') AS "datetime.date(2023, 4, 7)" |
2 changes: 2 additions & 0 deletions
2
...ackends/tests/snapshots/test_temporal/test_temporal_literals/clickhouse-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
toDateTime64('2023-04-07T04:05:06.230136', 6) AS "datetime.datetime(2023, 4, 7, 4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/impala-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'2023-04-07' AS `datetime.date(2023, 4, 7)` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/impala-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'2023-04-07T04:05:06.230136' AS `datetime.datetime(2023, 4, 7, 4, 5, 6, 230136)` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/snowflake-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
DATE_FROM_PARTS(2023, 4, 7) AS "datetime.date(2023, 4, 7)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/snowflake-time/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
TIME_FROM_PARTS(4, 5, 6, 230136000) AS "datetime.time(4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
...backends/tests/snapshots/test_temporal/test_temporal_literals/snowflake-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
TIMESTAMP_FROM_PARTS(2023, 4, 7, 4, 5, 6, 230136000) AS "datetime.datetime(2023, 4, 7, 4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/sqlite-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'2023-04-07' AS "datetime.date(2023, 4, 7)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/sqlite-time/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'04:05:06.230136' AS "datetime.time(4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/sqlite-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'2023-04-07 04:05:06.230136' AS "datetime.datetime(2023, 4, 7, 4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/trino-date/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
FROM_ISO8601_DATE('2023-04-07') AS "datetime.date(2023, 4, 7)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/trino-time/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06.230136' AS TIME) AS "datetime.time(4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_temporal_literals/trino-timestamp/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST(FROM_ISO8601_TIMESTAMP('2023-04-07T04:05:06.230136') AS TIMESTAMP) AS "datetime.datetime(2023, 4, 7, 4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/0-bigquery/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06' AS TIME) AS `datetime_time_4_ 5_ 6` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/0-snowflake/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
TIME_FROM_PARTS(4, 5, 6, 0) AS "datetime.time(4, 5, 6)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/0-sqlite/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'04:05:06.000000' AS "datetime.time(4, 5, 6)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/0-trino/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06' AS TIME) AS "datetime.time(4, 5, 6)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/234567-bigquery/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06.234567' AS TIME) AS `datetime_time_4_ 5_ 6_ 234567` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/234567-snowflake/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
TIME_FROM_PARTS(4, 5, 6, 234567000) AS "datetime.time(4, 5, 6, 234567)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/234567-sqlite/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'04:05:06.234567' AS "datetime.time(4, 5, 6, 234567)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/234567-trino/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06.234567' AS TIME) AS "datetime.time(4, 5, 6, 234567)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/bigquery/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
CAST('04:05:06.230136' AS TIME) AS `datetime_time_4_ 5_ 6_ 230136` |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/duckdb/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
MAKE_TIME(4, 5, 6.230136) AS "datetime.time(4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/snowflake/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
TIME_FROM_PARTS(4, 5, 6, 230136000) AS "datetime.time(4, 5, 6, 230136)" |
2 changes: 2 additions & 0 deletions
2
ibis/backends/tests/snapshots/test_temporal/test_time_literals/sqlite/out.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
SELECT | ||
'04:05:06.230136' AS "datetime.time(4, 5, 6, 230136)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters