john-bodley commented on code in PR #20152:
URL: https://github.com/apache/superset/pull/20152#discussion_r878641646


##########
superset/db_engine_specs/trino.py:
##########
@@ -33,66 +32,11 @@
 logger = logging.getLogger(__name__)
 
 
-class TrinoEngineSpec(BaseEngineSpec):
+class TrinoEngineSpec(PrestoEngineSpec):
     engine = "trino"
-    engine_aliases = {"trinonative"}
+    engine_aliases = {"trinonative"}  # Required for backwards compatibility.
     engine_name = "Trino"
 
-    _time_grain_expressions = {
-        None: "{col}",
-        "PT1S": "date_trunc('second', CAST({col} AS TIMESTAMP))",
-        "PT1M": "date_trunc('minute', CAST({col} AS TIMESTAMP))",
-        "PT1H": "date_trunc('hour', CAST({col} AS TIMESTAMP))",
-        "P1D": "date_trunc('day', CAST({col} AS TIMESTAMP))",
-        "P1W": "date_trunc('week', CAST({col} AS TIMESTAMP))",
-        "P1M": "date_trunc('month', CAST({col} AS TIMESTAMP))",
-        "P3M": "date_trunc('quarter', CAST({col} AS TIMESTAMP))",
-        "P1Y": "date_trunc('year', CAST({col} AS TIMESTAMP))",
-        # "1969-12-28T00:00:00Z/P1W",  # Week starting Sunday

Review Comment:
   I'm really not sure why these were commented out. This has always been the 
case since the first version of this file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to