Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.38.0
Description
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.
Attachments
Issue Links
- Blocked
-
CALCITE-6888 Doris dialect implementation
-
- Closed
-
- links to