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

Elon

03/31/2021, 4:53 AM
The following query compiles with the calcite compiler but the broker request still uses the pql2 compiler which fails:
Copy code
select foo from table
where
and case bar when 1,2,3 then 4 when 4,5,6 then 5 when 7 then 6 when 8 then 7 else 17 end = 6
limit 10
Should
org.apache.pinot.common.request.transform.TransformExpressionTree
use the calcite compiler instead of the pql2 compiler if the endpoint is the "sql" endpoint?
k

Kishore G

03/31/2021, 4:56 AM
Good point.. we should make that change. @Mayank ^^
👍 1
m

Mayank

03/31/2021, 5:05 AM
Yes, we should make that change within the scope of deprecating PQL. Last time I had looked at it, it didn't seem like a trivial change.
💡 1
e

Elon

03/31/2021, 5:05 AM
that's the only form of case statement that calcite compiles which doesn't work w pql it seems.
j

Jackie

03/31/2021, 5:09 AM
TransformExpressionTree
is for PQL
BrokerRequest
only. Once we deprecate PQL, we can remove this class
Actually after releasing
0.7
, we can already only compile
PinotQuery
for SQL query and leave
BrokerRequest
empty
❤️ 1
e

Elon

03/31/2021, 5:14 AM
We're still on v6 - seems like no matter what it uses the pql compiler in BrokerRequestHandler but only for the filter.
We will try out v7