cecemei commented on code in PR #18342:
URL: https://github.com/apache/druid/pull/18342#discussion_r2250434651


##########
processing/src/main/java/org/apache/druid/data/input/impl/AggregateProjectionSpec.java:
##########
@@ -146,6 +163,7 @@ public boolean equals(Object o)
     }
     AggregateProjectionSpec that = (AggregateProjectionSpec) o;
     return Objects.equals(name, that.name)
+           && Objects.equals(filter, that.filter)

Review Comment:
   Is it intentional `timeColumnName` is not included in equals/ hashCode/ 
toString method, but `ordering` is? Both are derived so seems like not needed.



##########
processing/src/main/java/org/apache/druid/segment/AggregateProjectionMetadata.java:
##########
@@ -219,7 +233,7 @@ public Schema(
       }
       this.timeColumnName = timeColumnName;
       this.timeColumnPosition = foundTimePosition;
-      this.granularity = granularity == null ? Granularities.ALL : granularity;
+      this.effectiveGranularity = granularity == null ? Granularities.ALL : 
granularity;

Review Comment:
   i think we're expecting the same size/ ordering bwteen groupingColumns and 
OrderBy between line 223 and 224, this assumption is guaranteed from 
`ProjectionsSpec` but not obvious here, maybe worth adding some checks. 



##########
processing/src/main/java/org/apache/druid/segment/AggregateProjectionMetadata.java:
##########
@@ -219,7 +233,7 @@ public Schema(
       }
       this.timeColumnName = timeColumnName;
       this.timeColumnPosition = foundTimePosition;
-      this.granularity = granularity == null ? Granularities.ALL : granularity;
+      this.effectiveGranularity = granularity == null ? Granularities.ALL : 
granularity;

Review Comment:
   also it seems like this `effectiveGranularity` and 
`orderingWithTimeSubstitution` logic is very similar to the `computeOrdering` 
function, maybe it could be merged?



-- 
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]

Reply via email to