You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "dang-stripe (via GitHub)" <gi...@apache.org> on 2025/02/25 06:01:56 UTC
[I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
dang-stripe opened a new issue, #15121:
URL: https://github.com/apache/pinot/issues/15121
We're hitting an error here: https://github.com/apache/pinot/blob/master/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/executor/OpChainSchedulerService.java#L80 on a multi-stage query. How can I debug this further? We're running on [this commit](https://github.com/apache/pinot/commit/e35f43c151bc0da540ad92324bb4771be509ae1b) on master for this cluster.
```
[2025-02-24 18:09:13.887616] INFO [DataBlockUtils] [query-runner-on-8442-1-thread-315792:52] Caught exception while processing query
[2025-02-24 18:09:13.887623] java.lang.RuntimeException: Cancelled by sender with exception: Error block {1000=null
[2025-02-24 18:09:13.887628] java.lang.ArrayIndexOutOfBoundsException}
[2025-02-24 18:09:13.887645] at org.apache.pinot.query.mailbox.GrpcSendingMailbox.cancel(GrpcSendingMailbox.java:108) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887659] at org.apache.pinot.query.runtime.operator.exchange.BlockExchange.cancel(BlockExchange.java:137) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887673] at org.apache.pinot.query.runtime.operator.MailboxSendOperator.cancel(MailboxSendOperator.java:189) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887685] at org.apache.pinot.query.runtime.operator.OpChain.cancel(OpChain.java:96) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887699] at org.apache.pinot.query.runtime.executor.OpChainSchedulerService$1.runJob(OpChainSchedulerService.java:82) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887711] at org.apache.pinot.core.util.trace.TraceRunnable.run(TraceRunnable.java:40) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887719] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
[2025-02-24 18:09:13.887727] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
[2025-02-24 18:09:13.887735] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
[2025-02-24 18:09:13.887742] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
[2025-02-24 18:09:13.887748] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[2025-02-24 18:09:13.887754] Caused by: java.lang.RuntimeException: Error block {1000=null
[2025-02-24 18:09:13.887765] java.lang.ArrayIndexOutOfBoundsException}
[2025-02-24 18:09:13.887778] at org.apache.pinot.query.runtime.executor.OpChainSchedulerService$1.runJob(OpChainSchedulerService.java:80) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-02-24 18:09:13.887782] ... 6 more
```
cc @Jackie-Jiang
--
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-unsubscribe@pinot.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang closed issue #15121: `ArrayIndexOutOfBoundsException` error for multi-stage query
URL: https://github.com/apache/pinot/issues/15121
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2686066441
@dang-stripe
Is it constantly reproducible with the below query? If you can provide the minimum query that can reproduce this issue, we can also try to reproduce it locally to further debug the issue.
```
SELECT
"event_date",
"group_id",
SUM(CASE WHEN "event_type" = 'START' THEN 1 ELSE 0 END) AS "started",
SUM(CASE WHEN "event_type" = 'END' THEN 1 ELSE 0 END) AS "ended",
SUM(CASE WHEN "event_type" = 'START' THEN 1 WHEN "event_type" = 'END' THEN -1 ELSE 0 END) AS "changed"
FROM "events"
GROUP BY 1, 2
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2704922416
Thanks @yashmayya for fixing this!
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "gortiz (via GitHub)" <gi...@apache.org>.
gortiz commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2684895058
We are trying to improve the user experience dealing with errors. I've created https://github.com/apache/pinot/issues/14950 to have all the improvements we want to show in a single place.
This specific error seems to be related to an implementation issue, in which case I don't think the internals of the error should reach the customer. Specifically, the stack trace is not something users are going to find very useful. Instead, we should have an easy way to match these errors with the stack traces in the server/broker where the error was produced
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2702270791
Here's the smaller version of the query that reproduces it. The window function isn't necessary.
```
WITH "simple_data" AS (
SELECT "user_id",
"value",
"date"
FROM "events_table"
WHERE "account_id" = 'acct_sample123'
LIMIT 500
)
SELECT "date",
SUM(
CASE
WHEN "value" > 0 THEN 1
ELSE 0
END
) AS "count_positive"
FROM "simple_data"
GROUP BY 1
LIMIT 10
```
Explain plan
```
Execution Plan
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT($1)])
PinotLogicalExchange(distribution=[hash[0]])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT() FILTER $1])
LogicalProject(date=[$1], $f2=[>($0, 0)])
LogicalSort(offset=[0], fetch=[500])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[500])
LogicalProject(value=[$12], date=[$9])
LogicalFilter(condition=[=($3, _UTF-8'acct_sample123')])
LogicalTableScan(table=[[default, events_table]])
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2705089261
@yashmayya @Jackie-Jiang We seem to still be hitting the error after rolling out the fix. The simpler version of the query works, so let me try to repro.
```
Received error query execution result block: {1000=Index 103 out of bounds for length 100
java.lang.ArrayIndexOutOfBoundsException: Index 103 out of bounds for length 100
at org.apache.pinot.core.query.aggregation.groupby.DoubleGroupByResultHolder.getDoubleResult(DoubleGroupByResultHolder.java:79)
at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:184)
at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:36)
at org.apache.pinot.query.runtime.operator.MultistageGroupByExecutor.getResultValue(MultistageGroupByExecutor.java:184)}
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2702206671
We found the stacktrace after restarting the server:
```
[2025-03-05 22:17:19.006030] java.lang.ArrayIndexOutOfBoundsException: Index 232 out of bounds for length 200
[2025-03-05 22:17:19.006038] at org.apache.pinot.core.query.aggregation.groupby.DoubleGroupByResultHolder.getDoubleResult(DoubleGroupByResultHolder.java:79)
[2025-03-05 22:17:19.006047] at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:184)
[2025-03-05 22:17:19.006056] at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:36)
[2025-03-05 22:17:19.006064] at org.apache.pinot.query.runtime.operator.MultistageGroupByExecutor.getResultValue(MultistageGroupByExecutor.java:184)}
[2025-03-05 22:17:19.006077] at org.apache.pinot.query.mailbox.GrpcSendingMailbox.cancel(GrpcSendingMailbox.java:108) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006092] at org.apache.pinot.query.runtime.operator.exchange.BlockExchange.cancel(BlockExchange.java:137) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006106] at org.apache.pinot.query.runtime.operator.MailboxSendOperator.cancel(MailboxSendOperator.java:189) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006118] at org.apache.pinot.query.runtime.operator.OpChain.cancel(OpChain.java:96) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006132] at org.apache.pinot.query.runtime.executor.OpChainSchedulerService$1.runJob(OpChainSchedulerService.java:82) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006160] at org.apache.pinot.core.util.trace.TraceRunnable.run(TraceRunnable.java:40) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006172] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[?:?]
[2025-03-05 22:17:19.006179] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
[2025-03-05 22:17:19.006186] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
[2025-03-05 22:17:19.006193] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
[2025-03-05 22:17:19.006198] at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[2025-03-05 22:17:19.006205] Caused by: java.lang.RuntimeException: Error block {1000=Index 232 out of bounds for length 200
[2025-03-05 22:17:19.006212] java.lang.ArrayIndexOutOfBoundsException: Index 232 out of bounds for length 200
[2025-03-05 22:17:19.006220] at org.apache.pinot.core.query.aggregation.groupby.DoubleGroupByResultHolder.getDoubleResult(DoubleGroupByResultHolder.java:79)
[2025-03-05 22:17:19.006228] at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:184)
[2025-03-05 22:17:19.006238] at org.apache.pinot.core.query.aggregation.function.CountAggregationFunction.extractGroupByResult(CountAggregationFunction.java:36)
[2025-03-05 22:17:19.006246] at org.apache.pinot.query.runtime.operator.MultistageGroupByExecutor.getResultValue(MultistageGroupByExecutor.java:184)}
[2025-03-05 22:17:19.006260] at org.apache.pinot.query.runtime.executor.OpChainSchedulerService$1.runJob(OpChainSchedulerService.java:80) ~[pinot-all-1.3.0-2025-01-13-997d04630b-SNAPSHOT-jar-with-dependencies.jar:1.3.0-2025-01-13-997d04630b-SNAPSHOT-997d04630b460e2e02b679fc63d8fe0f27610e0b]
[2025-03-05 22:17:19.006263] ... 6 more
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2698972970
@gortiz @yashmayya Can you try to reproduce this?
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "yashmayya (via GitHub)" <gi...@apache.org>.
yashmayya commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2699940673
@Jackie-Jiang this doesn't seem to be reproducible on quickstarts so seems like it could have something to do with the specific data queried?
This query:
```
WITH "windowed_data" AS (
SELECT "playerID",
"numberOfGames",
SUM("numberOfGames") OVER (
PARTITION BY "playerID"
ORDER BY "yearID"
) AS "running_total",
"teamID"
FROM "baseballStats"
WHERE "league" IN ('AL', 'NL')
LIMIT 500
)
SELECT "teamID",
SUM(
CASE
WHEN "numberOfGames" <= 10
AND "running_total" = 6 THEN 1
ELSE 0
END
) AS "count_type_a"
FROM "windowed_data"
GROUP BY 1
LIMIT 10
```
with the following plan:
```
Execution Plan
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT($1)])
PinotLogicalExchange(distribution=[hash[0]])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT() FILTER $1])
LogicalProject(teamID=[$2], $f2=[AND(<=($0, 10), =($1, 6))])
LogicalSort(offset=[0], fetch=[500])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[500])
LogicalProject(numberOfGames=[$0], running_total=[$4], teamID=[$2])
LogicalWindow(window#0=[window(partition {1} order by [3] aggs [SUM($0)])])
PinotLogicalSortExchange(distribution=[hash[1]], collation=[[3]], isSortOnSender=[false], isSortOnReceiver=[true])
LogicalProject(numberOfGames=[$14], playerID=[$16], teamID=[$25], yearID=[$27])
LogicalFilter(condition=[OR(=($13, _UTF-8'AL'), =($13, _UTF-8'NL'))])
LogicalTableScan(table=[[default, baseballStats]])
```
runs fine locally.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2683208509
I've narrowed it down to this part of the query.
* when i comment the sum agg out it works
* when i switch to count/min/max it works
* when i switch to count(*) filter it still fails
```
"changes" AS (
SELECT
"event_date",
"group_id",
SUM(CASE WHEN "event_type" = 'START' THEN 1 ELSE 0 END) AS "started",
SUM(CASE WHEN "event_type" = 'END' THEN 1 ELSE 0 END) AS "ended",
SUM(CASE WHEN "event_type" = 'START' THEN 1 WHEN "event_type" = 'END' THEN -1 ELSE 0 END) AS "changed"
FROM "events"
GROUP BY 1, 2
),
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2686060396
@yashmayya The only other server logs around that time look like this. I've tried searching for `ArrayIndexOutOfBoundsException` and haven't been able to find a full stacktrace unfortunately.
```
[2025-02-26 08:29:35.368870] INFO [DataBlockUtils] [query-runner-on-8442-1-thread-87844:73] Caught exception while processing query [2025-02-26 08:29:35.368904] java.lang.ArrayIndexOutOfBoundsException: null
[2025-02-26 08:29:35.369583] INFO [BlockingMultiStreamConsumer] [query-runner-on-8442-1-thread-87895:73] ==[RECEIVE]== Error block found from : 126145356000614060_55_13 in mailbox 126145356000614060|14|55|13|55
[2025-02-26 08:29:35.370364] INFO [BlockingMultiStreamConsumer] [query-runner-on-8442-1-thread-87822:73] ==[RECEIVE]== Error block found from : 126145356000614060_55_12 in mailbox 126145356000614060|13|55|12|55
[2025-02-26 08:29:35.370397] ERROR [OpChainSchedulerService] [query-runner-on-8442-1-thread-87844:73] (OpChain{126145356000614060_55_14}): Completed erroneously null {1000=null [2025-02-26 08:29:35.370408] java.lang.ArrayIndexOutOfBoundsException}
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2683502195
@gortiz From observability perspective, the exception message doesn't include the stack trace of the original exception (i.e `java.lang.ArrayIndexOutOfBoundsException`). We should improve this
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2702264622
@yashmayya The issue might be introduced by #14211. I tried putting the option `SET filteredAggregationsSkipEmptyGroups = true;` and the query works. The exception is from `MultistageGroupByExecutor` where the result holder size mismatches with the group generator. Can you help fix this?
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "yashmayya (via GitHub)" <gi...@apache.org>.
yashmayya commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2683905618
@dang-stripe are there any more errors in the server logs that could provide more context on the actual issue causing the `ArrayIndexOutOfBoundsException `? I agree that we need to improve reporting of the original error in such cases though.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "Jackie-Jiang (via GitHub)" <gi...@apache.org>.
Jackie-Jiang commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2683498189
@gortiz @yashmayya Can you help take a look?
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
Re: [I] `ArrayIndexOutOfBoundsException` error for multi-stage query [pinot]
Posted by "dang-stripe (via GitHub)" <gi...@apache.org>.
dang-stripe commented on issue #15121:
URL: https://github.com/apache/pinot/issues/15121#issuecomment-2698949621
@Jackie-Jiang I've narrowed this down to when we're using a window function and sum/case/when or count/filter. It does not happen without the window function. Here's an example query.
```
WITH "windowed_data" AS (
SELECT
"user_id",
"value",
SUM("value") OVER (
PARTITION BY "user_id"
ORDER BY "timestamp"
) AS "running_total",
"date" AS "event_date"
FROM "events_table"
WHERE "account_id" = 'acct_sample123'
LIMIT 500
)
SELECT
"event_date",
SUM(CASE WHEN "value" < 0 AND "running_total" = 0 THEN 1 ELSE 0 END) AS "count_type_a"
FROM "windowed_data"
GROUP BY 1
LIMIT 10
```
The explain plan looks like this:
```
LogicalSort(offset=[0], fetch=[10])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[10])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT($1)])
PinotLogicalExchange(distribution=[hash[0]])
PinotLogicalAggregate(group=[{0}], agg#0=[COUNT() FILTER $1])
LogicalProject(event_date=[$2], $f2=[AND(<($0, 0), =($1, 0))])
LogicalSort(offset=[0], fetch=[500])
PinotLogicalSortExchange(distribution=[hash], collation=[[]], isSortOnSender=[false], isSortOnReceiver=[false])
LogicalSort(fetch=[500])
LogicalProject(value=[$3], running_total=[$4], event_date=[$2])
LogicalWindow(window#0=[window(partition {0} order by [1] aggs [SUM($3)])])
PinotLogicalSortExchange(distribution=[hash[0]], collation=[[1]], isSortOnSender=[false], isSortOnReceiver=[true])
LogicalProject(user_id=[$6], timestamp=[$8], date=[$9], value=[$12])
LogicalFilter(condition=[=($3, _UTF-8'acct_sample123')])
LogicalTableScan(table=[[default, events_table]])
```
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org