avshenuk opened a new issue, #16251: URL: https://github.com/apache/pinot/issues/16251
Query: ``` SET useSpools = true; with current_user_urls as (select distinct url from events where "time" between '2025-06-18 10:41:43' and '2025-06-19 10:41:43' and site in ('<site1>', '<site2>') and userId = '<userId>'), twins as (select userId from events where "time" between '2025-06-18 10:41:43' and '2025-06-19 10:41:43' and site in ('<site1>', '<site2>') and userId != '' and url in (select url from current_user_urls) group by userId order by count(*) desc limit 100) select url from events where "time" between '2025-06-18 10:41:43' and '2025-06-19 10:41:43' and site in ('<site1>', '<site2>' and url not in (select url from current_user_urls) and userId in (select userId from twins) group by url order by count(*) desc limit 300; ``` Schema is the most standard one with the "time" column of type TIMESTAMP and the rest are STRINGs. Periodically (not every single time but quite often) fails with: ``` Error Code: 200 QueryExecutionError: Received error query execution result block: {1000=Cannot merge stats from early stage 7 into stats of later stage 11 java.lang.IllegalArgumentException: Cannot merge stats from early stage 7 into stats of later stage 11 at org.apache.pinot.shaded.com.google.common.base.Preconditions.checkArgument(Preconditions.java:302) at org.apache.pinot.query.runtime.plan.MultiStageQueryStats.mergeUpstream(MultiStageQueryStats.java:226) at org.apache.pinot.query.runtime.operator.utils.BlockingMultiStreamConsumer$OfTransferableBlock.onConsumerFinish(BlockingMultiStreamConsumer.java:268) at org.apache.pinot.query.runtime.operator.utils.BlockingMultiStreamConsumer$OfTransferableBlock.onConsumerFinish(BlockingMultiStreamConsumer.java:245)} org.apache.pinot.query.service.dispatch.QueryDispatcher.runReducer(QueryDispatcher.java:462) org.apache.pinot.query.service.dispatch.QueryDispatcher.submitAndReduce(QueryDispatcher.java:133) org.apache.pinot.broker.requesthandler.MultiStageBrokerRequestHandler.handleRequest(MultiStageBrokerRequestHandler.java:255) org.apache.pinot.broker.requesthandler.BaseBrokerRequestHandler.handleRequest(BaseBrokerRequestHandler.java:168) ``` Around 220M rows spread across ~400 segments on an OFFLINE table. Pinot version: ``` { "pinot-kafka-2.0": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-avro": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-yammer": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-thrift": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-batch-ingestion-standalone": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-orc": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-gcs": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-azure": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-hdfs": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-kinesis": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-protobuf": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-distribution": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-csv": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-s3": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-segment-uploader-default": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-confluent-avro": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-clp-log": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-pulsar": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-dropwizard": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-timeseries-m3ql": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-adls": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-json": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-minion-builtin-tasks": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-parquet": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965", "pinot-segment-writer-file-based": "1.4.0-SNAPSHOT-eb9c759344502969c80e3e9ec00fe67bd24d2965" } ``` Hope that helps. -- 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.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