Consider following query:
SELECT
COUNT(*) unfiltered,
COUNT(*) FILTER (WHERE a."Id" <= 5) AS filtered
FROM db.example."Articles" a
This should return something like:
unfiltered | filtered
456 | 5
But Apache Drill returns:
unfiltered | filtered
456 | 456
Apparently FILTER WHERE does not work. Is it bug or feature? If it's not supported, why Drill does not throw any error when parsing this SQL?
Using Drill 1.16.0