https://pinot.apache.org/ logo
e

Elon

05/21/2021, 3:05 AM
is there a way to represent an array literal in pinot sql? I tried
ARRAY[1,2,3]
in a filter and a select and it didn't work.
x

Xiang Fu

05/21/2021, 3:40 AM
Hmm, do you want exact match of 1,2,3?
e

Elon

05/21/2021, 3:41 AM
sure
is there a way to also get array contains?
but exact match also
x

Xiang Fu

05/21/2021, 3:45 AM
for array contains, you can do col IN (1,2,3). This will match the row contains either 1 or 2 or 3.
πŸ’‘ 1
You van do col=1 and col=2 and col =3 to ensure the row has all 1,2,3 matches
But it will also match 1,2,3,4,5
πŸ‘ 1
e

Elon

05/21/2021, 3:47 AM
is there a way to represent an array literal ?
in filter or select?
x

Xiang Fu

05/21/2021, 3:48 AM
I don’t think we have that right now
πŸ‘ 1
e

Elon

05/21/2021, 3:48 AM
ok, thanks! good to know, I'll stop playing around with that then:)
πŸ‘ 1