mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
fix(presto,trino): use correct literal dttm separator (#20123)
* fix(presto,trino): use correct literal dttm separator * remove redundant tests
This commit is contained in:
@@ -512,19 +512,6 @@ class TestPrestoDbEngineSpec(TestDbEngineSpec):
|
||||
query_result = str(result.compile(compile_kwargs={"literal_binds": True}))
|
||||
self.assertEqual("SELECT \nWHERE ds = '01-01-19' AND hour = 1", query_result)
|
||||
|
||||
def test_convert_dttm(self):
|
||||
dttm = self.get_dttm()
|
||||
|
||||
self.assertEqual(
|
||||
PrestoEngineSpec.convert_dttm("DATE", dttm),
|
||||
"DATE '2019-01-02'",
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
PrestoEngineSpec.convert_dttm("TIMESTAMP", dttm),
|
||||
"TIMESTAMP '2019-01-02T03:04:05.678900'",
|
||||
)
|
||||
|
||||
def test_query_cost_formatter(self):
|
||||
raw_cost = [
|
||||
{
|
||||
|
||||
@@ -27,19 +27,6 @@ from tests.integration_tests.db_engine_specs.base_tests import TestDbEngineSpec
|
||||
|
||||
|
||||
class TestTrinoDbEngineSpec(TestDbEngineSpec):
|
||||
def test_convert_dttm(self):
|
||||
dttm = self.get_dttm()
|
||||
|
||||
self.assertEqual(
|
||||
TrinoEngineSpec.convert_dttm("DATE", dttm),
|
||||
"DATE '2019-01-02'",
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
TrinoEngineSpec.convert_dttm("TIMESTAMP", dttm),
|
||||
"TIMESTAMP '2019-01-02T03:04:05.678900'",
|
||||
)
|
||||
|
||||
def test_adjust_database_uri(self):
|
||||
url = URL(drivername="trino", database="hive")
|
||||
TrinoEngineSpec.adjust_database_uri(url, selected_schema="foobar")
|
||||
|
||||
Reference in New Issue
Block a user