Hi all, reading the documentation on <querying Pin...
# getting-started
r
Hi all, reading the documentation on querying Pinot as I'm looking for an example of a UNION query. I see a link to the calcite parser that seems to indicate that UNION is supported, but I'm getting an error when I run an actual query
java.lang.ClassCastException: class org.apache.calcite.sql.SqlBasicCall cannot be cast to class org.apache.calcite.sql.SqlSelect
. Can someone please confirm whether UNION is supported or not?
m
Hi @User Pinot does use calcite parser. However, the execution engine currently doesn’t support some of the constructs like complex joins, nested queries and unions.
r
thank you for confirming, @User! So is there another option I can use in this case (that's not Presto/Trino)? I am really looking for a subtotal of an aggregate query that would be the result of this:
Copy code
SELECT a, COUNT(1)
FROM pinotTable
GROUP BY a
UNION ALL
SELECT 'Total', COUNT(1)
FROM pinotTable
m
May be run the two queries separately and union on client side?
r
Yep, that's the only solution I can think of as well 🙂 Thank you!
👍 1