mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
fix(sqla): replace custom dttm type with literal_column (#19917)
This commit is contained in:
@@ -26,21 +26,21 @@ from flask.ctx import AppContext
|
||||
"target_type,dttm,result",
|
||||
[
|
||||
("VARCHAR", datetime(2022, 1, 1), None),
|
||||
("DATE", datetime(2022, 1, 1), "from_iso8601_date('2022-01-01')"),
|
||||
("DATE", datetime(2022, 1, 1), "DATE '2022-01-01'"),
|
||||
(
|
||||
"TIMESTAMP",
|
||||
datetime(2022, 1, 1, 1, 23, 45, 600000),
|
||||
"from_iso8601_timestamp('2022-01-01T01:23:45.600000')",
|
||||
"TIMESTAMP '2022-01-01T01:23:45.600000'",
|
||||
),
|
||||
(
|
||||
"TIMESTAMP WITH TIME ZONE",
|
||||
datetime(2022, 1, 1, 1, 23, 45, 600000),
|
||||
"from_iso8601_timestamp('2022-01-01T01:23:45.600000')",
|
||||
"TIMESTAMP '2022-01-01T01:23:45.600000'",
|
||||
),
|
||||
(
|
||||
"TIMESTAMP WITH TIME ZONE",
|
||||
datetime(2022, 1, 1, 1, 23, 45, 600000, tzinfo=pytz.UTC),
|
||||
"from_iso8601_timestamp('2022-01-01T01:23:45.600000+00:00')",
|
||||
"TIMESTAMP '2022-01-01T01:23:45.600000+00:00'",
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user