-
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.
fix(bigquery): generate the correct temporal literal type based on th…
…e presence of timezone information
- Loading branch information
Showing
14 changed files
with
20 additions
and
18 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
.../backends/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/datetime/index.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS DATETIME)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/datetime/name.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS TIMESTAMP) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS DATETIME) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
...s/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/string_timestamp/index.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS DATETIME)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
...ds/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/string_timestamp/name.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS TIMESTAMP) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS DATETIME) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
...backends/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/timestamp/index.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
MOD(EXTRACT(DAYOFWEEK FROM CAST('2017-01-01 04:55:59' AS DATETIME)) + 5, 7) AS `DayOfWeekIndex_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
.../backends/bigquery/tests/unit/snapshots/test_compiler/test_day_of_week/timestamp/name.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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS TIMESTAMP) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
INITCAP(CAST(CAST('2017-01-01 04:55:59' AS DATETIME) AS STRING FORMAT 'DAY')) AS `DayOfWeekName_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
...gquery/tests/unit/snapshots/test_compiler/test_literal_timestamp_or_time/datetime/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `tmp` | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `tmp` |
2 changes: 1 addition & 1 deletion
2
...ests/unit/snapshots/test_compiler/test_literal_timestamp_or_time/string_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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `tmp` | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `tmp` |
2 changes: 1 addition & 1 deletion
2
...query/tests/unit/snapshots/test_compiler/test_literal_timestamp_or_time/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `tmp` | ||
EXTRACT(hour FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `tmp` |
2 changes: 1 addition & 1 deletion
2
ibis/backends/bigquery/tests/unit/snapshots/test_compiler/test_literal_year/datetime/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
...ds/bigquery/tests/unit/snapshots/test_compiler/test_literal_year/string_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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
2 changes: 1 addition & 1 deletion
2
.../backends/bigquery/tests/unit/snapshots/test_compiler/test_literal_year/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
SELECT | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS TIMESTAMP)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` | ||
EXTRACT(year FROM CAST('2017-01-01 04:55:59' AS DATETIME)) AS `ExtractYear_datetime_datetime_2017_ 1_ 1_ 4_ 55_ 59` |
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