Aaron Weiss
03/11/2022, 3:59 PMselect service, count(*) from immutable_unified_events group by service limit 10
I've tried this query in Trino using basic and passthrough syntax, but get the same error either way.
class java.lang.String cannot be cast to class java.util.List
Trino standard query:
select service, count(*) from pinot.default.immutable_unified_events group by service limit 10;
Trino passthrough query:
select * from pinot.default."select service, count(*) from immutable_unified_events group by service limit 10";
Elon
03/11/2022, 4:44 PMAaron Weiss
03/11/2022, 5:20 PMElon
03/11/2022, 5:21 PMAaron Weiss
03/11/2022, 9:25 PMElon
03/14/2022, 9:47 PMElon
03/14/2022, 9:47 PMElon
03/14/2022, 9:49 PMimmutable_unified_events
?Elon
03/14/2022, 9:50 PMElon
03/14/2022, 10:01 PMElon
03/14/2022, 10:05 PMElon
03/14/2022, 10:08 PMElon
03/14/2022, 10:09 PMnull
if not.Elon
03/14/2022, 10:09 PMJackie
03/14/2022, 10:15 PMElon
03/14/2022, 10:19 PMstring_array_col
with the following values
['hi', 'hello', 'how are you'],
[null],
['good day'],
['bye', 'good bye', 'take care']
Elon
03/14/2022, 10:19 PMselect string_array_col, count(*) from table group by string_array_col
Elon
03/14/2022, 10:20 PM'hello', 1
null, 2
'good bye', 1
Elon
03/14/2022, 10:21 PM['hi', 'hello', 'how are you'], 1
[null], 1
['good day'], 1
['bye', 'good bye', 'take care'], 1
Elon
03/14/2022, 10:22 PMElon
03/14/2022, 10:24 PMJackie
03/15/2022, 12:17 AMElon
03/15/2022, 12:17 AMElon
03/15/2022, 12:19 AMJackie
03/15/2022, 12:19 AMJackie
03/15/2022, 12:20 AMElon
03/15/2022, 12:20 AMElon
03/15/2022, 12:21 AMJackie
03/15/2022, 12:21 AMElon
03/15/2022, 12:21 AMJackie
03/15/2022, 12:22 AMAaron Weiss
03/15/2022, 1:38 PMElon
03/15/2022, 4:57 PMElon
03/15/2022, 7:15 PMAaron Weiss
03/15/2022, 7:17 PMAaron Weiss
03/15/2022, 7:18 PMElon
03/15/2022, 7:19 PMAaron Weiss
03/15/2022, 7:32 PMElon
03/15/2022, 7:33 PMselect col, ... from table group by col
will not modify or explode the column value.Elon
03/15/2022, 7:33 PMAaron Weiss
03/15/2022, 7:34 PMAaron Weiss
03/15/2022, 7:34 PMElon
03/15/2022, 7:34 PMElon
03/15/2022, 7:35 PMElon
03/15/2022, 7:35 PMselect * from pinot.default."select array_col, max(...), count(*), agg_function(...) from table group by array_col"
Elon
03/15/2022, 7:35 PMElon
03/15/2022, 7:36 PMselect array_col, count(*), max(...) from table group by array_col
Aaron Weiss
03/15/2022, 7:36 PMElon
03/15/2022, 7:36 PMElon
03/15/2022, 7:36 PMAaron Weiss
03/15/2022, 7:37 PMselect * from pinot.default."select service, count(*) from immutable_unified_events group by service limit 10";
Aaron Weiss
03/15/2022, 7:37 PMAaron Weiss
03/15/2022, 7:37 PMElon
03/15/2022, 7:37 PMAaron Weiss
03/15/2022, 7:38 PMElon
03/15/2022, 11:08 PMElon
03/15/2022, 11:08 PMAaron Weiss
03/15/2022, 11:08 PMElon
03/16/2022, 2:18 AMElon
03/16/2022, 2:18 AMElon
03/16/2022, 2:18 AMElon
03/16/2022, 2:19 AMAaron Weiss
03/16/2022, 2:13 PMpinot> SELECT COUNT(1) FROM pinot.default.immutable_unified_events WHERE browser = 'Chrome'
[2022-03-16 10:10:43] [58] Query failed (#20220315_220247_00048_mxd5n): line 1:75: Cannot apply operator: array(varchar) = varchar(6)
[2022-03-16 10:10:43] io.trino.spi.TrinoException: Unexpected parameters (array(varchar), varchar(6)) for function $operator$equal. Expected: $operator$equal(T, T) T:comparable
Tried the same with flexible syntax and while it doesn't error, it just returns NULL if filtering on MV col. If I use SV col, everything works as expected using either syntax.
SELECT * FROM pinot.default."SELECT COUNT(1) FROM immutable_unified_events WHERE browser = 'Chrome'"
Elon
03/16/2022, 3:05 PMbrowser
an MV column and immutable_unified_events
an SV column?Aaron Weiss
03/16/2022, 3:07 PMAaron Weiss
03/16/2022, 3:08 PMAaron Weiss
03/16/2022, 3:08 PMElon
03/16/2022, 3:08 PMAaron Weiss
03/16/2022, 3:08 PMSELECT COUNT(1) FROM immutable_unified_events WHERE browser = 'Chrome'
Elon
03/16/2022, 3:11 PMAaron Weiss
03/16/2022, 3:11 PMKamal Chavda
04/29/2023, 2:54 AMtrino error: line 1:50: Cannot apply operator: array(bigint) = integer
Is query passthrough still the only option? @Mayank, @Xiang Fu. Looks like MV column support was added to prestodb? https://github.com/prestodb/presto/pull/15093Elon
04/29/2023, 2:55 AMKamal Chavda
04/29/2023, 2:57 AMselect * from events where ids = 29536865 limit 10
ids
column is MV in the events
table in Pinot.Xiang Fu
Kamal Chavda
05/01/2023, 2:30 PMXiang Fu
Elon
05/01/2023, 4:51 PMKamal Chavda
05/01/2023, 5:15 PMarray(bigint)
. I tried similar query on array(varchar)
type column as well and got a failure. I'm running Trino 414 in K8s and Pinot is latest Startree version.Elon
05/01/2023, 5:26 PMKamal Chavda
05/01/2023, 6:56 PMTrino Error
trino error: line 1:64: Cannot apply operator: array(bigint) = integer
This may be triggered by:
Issue 1002 - The database returned an unexpected error.
See less
From Redash:
Error running query: TrinoUserError(type=USER_ERROR, name=TYPE_MISMATCH, message="line 1:65: Cannot apply operator: array(bigint) = integer", query_id=20230501_185514_00374_xk5ym)
DBeaver:
SQL Error [58]: Query failed (#20230501_171816_00370_xk5ym): line 2:65: Cannot apply operator: array(bigint) = integer
Kamal Chavda
05/01/2023, 6:58 PM0.13.0-ST.39
StartreeElon
05/01/2023, 7:10 PMKamal Chavda
05/01/2023, 7:29 PMElon
05/01/2023, 7:31 PMElon
05/01/2023, 7:33 PMElon
05/01/2023, 7:37 PMElon
05/01/2023, 7:38 PMElon
05/01/2023, 7:40 PMKamal Chavda
05/01/2023, 8:13 PMElon
05/01/2023, 8:13 PMXiang Fu