Open didip opened 6 months ago
On the WHERE 1=1
, the customer uses it to simply comment / uncomment where clauses before like this WHERE 1=1 AND date=X AND ...
The Trino community is trying to support StarRocks connector: https://github.com/trinodb/trino/issues/17329
Thanks to @chenjian2664
For what it's worth, i've implemented compatible HLL functions via Java UDF here
I will try to work on this issue!
Enhancements
First of all, Trino compatibility docs should tell users that to have the same result as Trino, this has to be set:
SET global sql_mode='SORT_NULLS_LAST';
The following functionalities are not currently implemented in Trino dialect:
from_iso8601_timestamp()
TO_DATE()
histogram()
array_agg()
regexp_split()
replace()
prepare_dedup()
EXECUTE IMMEDIATE
cast(our_table_5.column.value as UUID) = UUID'abc123'
cast(iceberg.our_table_4.total_unique as HyperLogLog)
EXECUTE statement1 USING 'abc123-uuid-pointer'
Also a few SQL issues:
SELECT (approx_percentile(cnt, 0.49) + approx_percentile(cnt, 0.51)) / DOUBLE '2.0'
. We can easily just say2.0
, but our customers will expect this to work.WHERE date between '2023-10-01' and '2023-10-01'
breaks the query planner. Preferably the planner should translate that toWHERE date = '2023-10-01'
.WHERE 1=1
breaks the query planner. Preferably the planner should consider this as no-op.