[
https://issues.apache.org/jira/browse/CALCITE-6820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939462#comment-17939462
]
Caican Cai commented on CALCITE-6820:
-------------------------------------
fixed in
https://github.com/apache/calcite/commit/ff50d1d42790c93050c62ca949913ce542f51d09,thanks
[~xuzifu666]
thanks for your review [~nobigo]
> Trino dialect implementation
> ----------------------------
>
> Key: CALCITE-6820
> URL: https://issues.apache.org/jira/browse/CALCITE-6820
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.38.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> Currently calcite not support dialect sql for trino, need to support it.
>
> Main differences such as:
> *select syntax*
> Trino support *fetch offset* but Presto not support the syntax
> Trino [https://trino.io/docs/current/sql/select.html:]
> [ WITH SESSION [ name = expression [, ...] ]
> [ WITH [ FUNCTION udf ] [, ...] ]
> [ WITH [ RECURSIVE ] with_query [, ...] ]
> SELECT [ ALL | DISTINCT ] select_expression [, ...]
> [ FROM from_item [, ...] ]
> [ WHERE condition ]
> [ GROUP BY [ ALL | DISTINCT ] grouping_element [, ...] ]
> [ HAVING condition]
> [ WINDOW window_definition_list]
> [ \{ UNION | INTERSECT | EXCEPT } [ ALL | DISTINCT ] select ]
> [ ORDER BY expression [ ASC | DESC ] [, ...] ]
> [ OFFSET count [ ROW | ROWS ] ]
> [ LIMIT \{ count | ALL } ]
> *[ FETCH \{ FIRST | NEXT } [ count ] \{ ROW | ROWS } \{ ONLY | WITH TIES } ]*
>
> Presto([https://prestodb.io/docs/current/sql/select.html):]
> [ WITH with_query [, ...] ] SELECT [ ALL | DISTINCT ] select_expr [, ...] [
> FROM from_item [, ...] ] [ WHERE condition ] [ GROUP BY [ ALL | DISTINCT ]
> grouping_element [, ...] ] [ HAVING condition] [ \{ UNION | INTERSECT |
> EXCEPT } [ ALL | DISTINCT ] select ] [ ORDER BY expression [ ASC | DESC ] [,
> ...] ] [ OFFSET count [ \{ ROW | ROWS } ] ] [ \{ LIMIT [ count | ALL ] } ]
>
> *functions:*
> Trino support *substring and substr* function, but Presto only support substr
> function
> Trino: [https://trino.io/docs/current/functions/string.html]
> Presto: [https://prestodb.io/docs/current/functions/string.html]
>
> This is just what I know, there are more. I plan submit more PRs to support
> gradually in future.This pr of issue aim to support Trino Dialect firstly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)