[
https://issues.apache.org/jira/browse/CALCITE-6929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939615#comment-17939615
]
Yu Xu edited comment on CALCITE-6929 at 3/31/25 9:43 AM:
---------------------------------------------------------
OK, there are several difference just as I know:
in functions:
1. presto support ends_with function but PG not support and need other way to
archive it.
2. such as substring function PG, eg: substring('Thomas' from 2 for 3) → hom,
but presto only can use as substr(string, start) —> string
can refer to [https://prestodb.github.io/docs/current/functions/string.html]
and [https://www.postgresql.org/docs/current/functions-string.html]
if we fix the compatibility problem in future maybe need to decouple the presto
resolve logic from PG firstly and I had updated the Jira description. WDYT
[~nobigo]
was (Author: JIRAUSER307770):
OK, there are several difference just as I know:
in functions:
1. presto support ends_with function but PG not support and need other way to
archive it.
2. such as substring function PG, eg: substring('Thomas' from 2 for 3) → hom,
but presto only can use as substr(string, start) —> string
can refer to [https://prestodb.github.io/docs/current/functions/string.html]
and [https://www.postgresql.org/docs/current/functions-string.html]
if we fix the compatibility problem in future maybe need to decouple the presto
resolve logic from PG firstly and I had updated the Jira description.
[~nobigo]
> PrestoSqlDialect unparseCall should not reuse from PostgreSqlDialect
> --------------------------------------------------------------------
>
> Key: CALCITE-6929
> URL: https://issues.apache.org/jira/browse/CALCITE-6929
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> Currently PrestoSqlDialect#unparseCall default condition reuse
> PostgreSqlDialect directly which would handle with floor function, it is not
> suitable when PostgreSqlDialect change in future but not consistent with
> Presto would bring risk in compatibility.
> for example:
> in functions:
> 1. presto support ends_with function but PG not support and need other way to
> archive it. can refer to
> [https://www.postgresql.org/message-id/DFC309C8A42633419600522FA8C4AE1A56110F%40mail-01.wrcapital.corp]
> 2. such as substring function PG, eg: substring('Thomas' from 2 for 3) → hom,
> but presto only can use as substr(string, start) —> string
> can refer to [https://prestodb.github.io/docs/current/functions/string.html]
> and [https://www.postgresql.org/docs/current/functions-string.html]
> if we fix the compatibility problem in future maybe need to decouple the
> presto resolve logic from PG firstly
--
This message was sent by Atlassian Jira
(v8.20.10#820010)