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


##########
processing/src/main/java/org/apache/druid/data/input/impl/AggregateProjectionSpec.java:
##########
@@ -230,10 +230,15 @@ private static ProjectionOrdering 
computeOrdering(VirtualColumns virtualColumns,
       } else {
         final VirtualColumn vc = 
virtualColumns.getVirtualColumn(dimension.getName());
         final Granularity maybeGranularity = 
Granularities.fromVirtualColumn(vc);
-        if (granularity == null && maybeGranularity != null) {
+        if (maybeGranularity == null || 
maybeGranularity.equals(Granularities.ALL)) {
+          // no __time in inputs or not supported, skip
+          continue;
+        }
+        if (granularity == null) {
           granularity = maybeGranularity;
           timeColumnName = dimension.getName();
-        } else if (granularity != null && maybeGranularity != null && 
maybeGranularity.isFinerThan(granularity)) {
+        } else if (maybeGranularity.isFinerThan(granularity)) {

Review Comment:
   added the requirement and test



-- 
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-unsubscr...@druid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to