You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/06/02 02:10:49 UTC
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #20152: refactor(trino): Handful of updates for the Trino engine
zhaoyongjie commented on code in PR #20152:
URL: https://github.com/apache/superset/pull/20152#discussion_r887438538
##########
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:
Trino was forked from Presto, I think comments this is safe. thanks for keeping clear up.
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org