Akshat-Jain commented on code in PR #17036:
URL: https://github.com/apache/druid/pull/17036#discussion_r1766586880
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java:
##########
@@ -451,6 +453,14 @@ private boolean comparePartitionKeys(ResultRow row1,
ResultRow row2, List<String
int match = 0;
for (String columnName : partitionColumnNames) {
int i = frameReader.signature().indexOf(columnName);
+ if
(ColumnType.STRING.equals(frameReader.signature().getColumnType(columnName).get())
&& (row1.get(i) instanceof List || row2.get(i) instanceof List)) {
+ // special handling to reject MVDs
+ throw new UOE(
Review Comment:
@sreemanamala I tried that originally, that isn't propagated to the end user
in MSQ:
`InvalidInput`:
<img width="1106" alt="image"
src="https://github.com/user-attachments/assets/2f85df04-fa37-4d02-aac5-30813a421741">
`UOE`:
<img width="1465" alt="image"
src="https://github.com/user-attachments/assets/9b027f77-545d-4d29-867b-20934582cee8">
In the case of InvalidInput, the error message gets buried in the stacktrace:
<details>
```
"exceptionStackTrace": "org.apache.druid.java.util.common.ISE: Failed to
gather clusterBy statistics for
stage[query-9935ebee-5ed5-4f39-99a6-5339f581c7aa_1]\n\tat
org.apache.druid.msq.exec.RunWorkOrder$ShufflePipelineBuilder$4.onFailure(RunWorkOrder.java:985)\n\tat
com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1119)\n\tat
org.apache.druid.java.util.common.concurrent.DirectExecutorService.execute(DirectExecutorService.java:81)\n\tat
com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1286)\n\tat
com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1055)\n\tat
com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:807)\n\tat
com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:55)\n\tat
org.apache.druid.frame.processor.RunAllFullyWidget$RunAllFullyRunnable.cleanup(RunAllFullyWidget.java:392)\n\tat
org.apache.druid.frame.processor.RunAllFully
Widget$RunAllFullyRunnable.cleanupIfNoMoreProcessors(RunAllFullyWidget.java:344)\n\tat
org.apache.druid.frame.processor.RunAllFullyWidget$RunAllFullyRunnable.access$900(RunAllFullyWidget.java:111)\n\tat
org.apache.druid.frame.processor.RunAllFullyWidget$RunAllFullyRunnable$1.onFailure(RunAllFullyWidget.java:328)\n\tat
com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1119)\n\tat
com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)\n\tat
com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1286)\n\tat
com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1055)\n\tat
com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:807)\n\tat
com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:55)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.fail(FrameProcessorExecutor.java:337)\n\tat
org.apache.d
ruid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:178)\n\tat
org.apache.druid.msq.exec.WorkerImpl$2$2.run(WorkerImpl.java:923)\n\tat
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat
java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)\n\tat
java.base/java.util.concurrent.FutureTask.run(FutureTask.java)\n\tat
org.apache.druid.query.PrioritizedListenableFutureTask.run(PrioritizedExecutorService.java:259)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat
java.base/java.lang.Thread.run(Thread.java:829)\nCaused by:
java.lang.RuntimeException: java.lang.RuntimeException:
java.lang.RuntimeException: org.apache.druid.error.DruidException: Encountered
a multi value column [v0]. Window processing does not support MVDs. Consider
using UNNEST o
r MV_TO_ARRAY.\n\tat
org.apache.druid.java.util.common.Either.valueOrThrow(Either.java:95)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:259)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.run(FrameProcessorExecutor.java:138)\n\t...
8 more\nCaused by: java.lang.RuntimeException: java.lang.RuntimeException:
org.apache.druid.error.DruidException: Encountered a multi value column [v0].
Window processing does not support MVDs. Consider using UNNEST or
MV_TO_ARRAY.\n\tat
org.apache.druid.java.util.common.Either.valueOrThrow(Either.java:95)\n\tat
org.apache.druid.frame.channel.BlockingQueueFrameChannel$Readable.read(BlockingQueueFrameChannel.java:240)\n\tat
org.apache.druid.msq.indexing.processor.KeyStatisticsCollectionProcessor.runIncrementally(KeyStatisticsCollectionProcessor.java:110)\n\tat
org.apache.druid.msq.counters.CpuTimeAccumulatingFrameProcessor.runIncrementally(CpuTim
eAccumulatingFrameProcessor.java:66)\n\tat
org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:72)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:230)\n\t...
9 more\nCaused by: java.lang.RuntimeException:
org.apache.druid.error.DruidException: Encountered a multi value column [v0].
Window processing does not support MVDs. Consider using UNNEST or
MV_TO_ARRAY.\n\tat
org.apache.druid.java.util.common.Either.valueOrThrow(Either.java:95)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:259)\n\t...
9 more\nCaused by: org.apache.druid.error.DruidException: Encountered a multi
value column [v0]. Window processing does not support MVDs. Consider using
UNNEST or MV_TO_ARRAY.\n\tat
org.apache.druid.error.BaseFailure.makeException(BaseFailure.java:55)\n\tat
org.apache.druid.error.Dru
idException.fromFailure(DruidException.java:157)\n\tat
org.apache.druid.error.InvalidInput.exception(InvalidInput.java:35)\n\tat
org.apache.druid.error.InvalidInput.exception(InvalidInput.java:30)\n\tat
org.apache.druid.msq.querykit.WindowOperatorQueryFrameProcessor.comparePartitionKeys(WindowOperatorQueryFrameProcessor.java:459)\n\tat
org.apache.druid.msq.querykit.WindowOperatorQueryFrameProcessor.runIncrementally(WindowOperatorQueryFrameProcessor.java:256)\n\tat
org.apache.druid.msq.counters.CpuTimeAccumulatingFrameProcessor.runIncrementally(CpuTimeAccumulatingFrameProcessor.java:66)\n\tat
org.apache.druid.frame.processor.FrameProcessors$1FrameProcessorWithBaggage.runIncrementally(FrameProcessors.java:72)\n\tat
org.apache.druid.frame.processor.FrameProcessorExecutor$1ExecutorRunnable.runProcessorNow(FrameProcessorExecutor.java:230)\n\t...
9 more\n"
```
</details>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]