LakshSingla commented on code in PR #16780:
URL: https://github.com/apache/druid/pull/16780#discussion_r1687779023
##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/querykit/WindowOperatorQueryFrameProcessor.java:
##########
@@ -499,7 +499,8 @@ private boolean comparePartitionKeys(ResultRow row1,
ResultRow row2, List<String
int match = 0;
for (String columnName : partitionColumnNames) {
int i = frameReader.signature().indexOf(columnName);
- if (Objects.equals(row1.get(i), row2.get(i))) {
+ NullableTypeStrategy<Object> nullableTypeStrategy =
frameReader.signature().getColumnType(columnName).get().getNullableStrategy();
+ if (nullableTypeStrategy.compare(row1.get(i), row2.get(i)) == 0) {
Review Comment:
We should cache the nullable type strategy in the processor, and use that to
compare.
Something like the following is more efficient given that this is called
pretty frequently
```java
// caching
NullableTypeStrategy[] typeStrategies = ...;
// comparing
typeStrategies[i].compare(...)
```
--
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]