mirror of https://github.com/apache/superset.git
Merge 31f5340412
into f5843fe588
This commit is contained in:
commit
cd5b256e47
|
@ -507,7 +507,10 @@ class PrestoBaseEngineSpec(BaseEngineSpec, metaclass=ABCMeta):
|
||||||
}
|
}
|
||||||
|
|
||||||
for col_name, value in zip(col_names, values):
|
for col_name, value in zip(col_names, values):
|
||||||
col_type = column_type_by_name.get(col_name)
|
col_type = None
|
||||||
|
if col_type_name := column_type_by_name.get(col_name):
|
||||||
|
if col_type_class := getattr(types, col_type_name, None):
|
||||||
|
col_type = col_type_class()
|
||||||
|
|
||||||
if isinstance(col_type, types.DATE):
|
if isinstance(col_type, types.DATE):
|
||||||
col_type = Date()
|
col_type = Date()
|
||||||
|
|
|
@ -116,10 +116,10 @@ def test_get_schema_from_engine_params() -> None:
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
["column_type", "column_value", "expected_value"],
|
["column_type", "column_value", "expected_value"],
|
||||||
[
|
[
|
||||||
(types.DATE(), "2023-05-01", "DATE '2023-05-01'"),
|
("DATE", "2023-05-01", "DATE '2023-05-01'"),
|
||||||
(types.TIMESTAMP(), "2023-05-01", "TIMESTAMP '2023-05-01'"),
|
("TIMESTAMP", "2023-05-01", "TIMESTAMP '2023-05-01'"),
|
||||||
(types.VARCHAR(), "2023-05-01", "'2023-05-01'"),
|
("VARCHAR", "2023-05-01", "'2023-05-01'"),
|
||||||
(types.INT(), 1234, "1234"),
|
("INT", 1234, "1234"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_where_latest_partition(
|
def test_where_latest_partition(
|
||||||
|
|
Loading…
Reference in New Issue