Single-stage selection queries that order by now() fail when the select list also projects another column. Server throws during plan construction:
java.lang.IllegalArgumentException: The query is not order by identifiers
at org.apache.pinot.core.operator.query.SelectionPartiallyOrderedByDescOperation.<init>(SelectionPartiallyOrderedByDescOperation.java:52)
at org.apache.pinot.core.plan.SelectionPlanNode.run(SelectionPlanNode.java:100)
Same failure for ORDER BY 2, ORDER BY 2 ASC, ORDER BY 2 DESC, and ORDER BY now().
Reproduction
Fails:
SELECT col, now() AS t
FROM my_table
ORDER BY 2 DESC
LIMIT 1;
Works:
SELECT now() AS t
FROM my_table
ORDER BY 1 DESC
LIMIT 1;
Works:
SELECT col, now() AS t
FROM my_table
ORDER BY col DESC
LIMIT 1;
Single-stage selection queries that order by
now()fail when the select list also projects another column. Server throws during plan construction:Reproduction
Fails:
Works:
Works: