[
https://issues.apache.org/jira/browse/CALCITE-6929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Xu updated CALCITE-6929:
---------------------------
Description:
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 starts_with/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
was:
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 starts_with/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
> 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 starts_with/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)