From 722e25ba02fedb9a49adeb5a65efbf8072c1d277 Mon Sep 17 00:00:00 2001 From: Akshat Jain Date: Wed, 24 Jul 2024 13:35:49 +0530 Subject: [PATCH] Convert typeStrategies from list to array --- .../msq/querykit/WindowOperatorQueryFrameProcessor.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java index fd98e5f6a892..5fbfd3119d03 100644 --- a/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java +++ b/extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java @@ -87,7 +87,7 @@ public class WindowOperatorQueryFrameProcessor implements FrameProcessor // List of type strategies to compare the partition columns across rows. // Type strategies are pushed in the same order as column types in frameReader.signature() - private final List> typeStrategies = new ArrayList<>(); + private final NullableTypeStrategy[] typeStrategies; public WindowOperatorQueryFrameProcessor( WindowOperatorQuery query, @@ -115,8 +115,9 @@ public WindowOperatorQueryFrameProcessor( this.partitionColumnNames = partitionColumnNames; this.frameReader = frameReader; + this.typeStrategies = new NullableTypeStrategy[frameReader.signature().size()]; for (int i = 0; i < frameReader.signature().size(); i++) { - typeStrategies.add(frameReader.signature().getColumnType(i).get().getNullableStrategy()); + typeStrategies[i] = frameReader.signature().getColumnType(i).get().getNullableStrategy(); } } @@ -507,7 +508,7 @@ private boolean comparePartitionKeys(ResultRow row1, ResultRow row2, List