yashmayya commented on PR #14102: URL: https://github.com/apache/pinot/pull/14102#issuecomment-2380395488
> Does Calcite automatically rewrite BETWEEN into >= and <=? Yes, that's right. > Will the change in https://github.com/apache/pinot/pull/13618 prevent this rewrite? No, it doesn't unfortunately, so this is another bug / issue. `select count(*) from airlineStats where arraytomv(RandomAirports) BETWEEN 'PSC' AND 'ATL'` from the default quickstart returns 0 on the single-stage query engine and 4478 on the multi-stage query engine due to the rewrite: ``` Execution Plan PinotLogicalAggregate(group=[{}], agg#0=[COUNT($0)]) PinotLogicalExchange(distribution=[hash]) PinotLogicalAggregate(group=[{}], agg#0=[COUNT()]) LogicalFilter(condition=[AND(>=(ARRAY_TO_MV($71), _UTF-8'PSC'), <=(ARRAY_TO_MV($71), _UTF-8'ATL'))]) LogicalTableScan(table=[[default, airlineStats]]) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org