rohangarg commented on code in PR #12472:
URL: https://github.com/apache/druid/pull/12472#discussion_r857096832


##########
processing/src/main/java/org/apache/druid/query/timeboundary/TimeBoundaryQueryQueryToolChest.java:
##########
@@ -224,4 +226,40 @@ public Result<TimeBoundaryResultValue> apply(Object input)
       }
     };
   }
+
+  @Override
+  public RowSignature resultArraySignature(TimeBoundaryQuery query)
+  {
+    if (query.isMinTime() || query.isMaxTime()) {
+      RowSignature.Builder builder = RowSignature.builder();
+      String outputName = query.isMinTime() ?
+                          
query.getContextValue(TimeBoundaryQuery.MIN_TIME_ARRAY_OUTPUT_NAME, 
TimeBoundaryQuery.MIN_TIME) :
+                          
query.getContextValue(TimeBoundaryQuery.MAX_TIME_ARRAY_OUTPUT_NAME, 
TimeBoundaryQuery.MAX_TIME);
+      return builder.add(outputName, ColumnType.LONG).build();
+    }
+    return super.resultArraySignature(query);

Review Comment:
   updated the PR desc with the min-max query limitation



##########
sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuery.java:
##########
@@ -822,6 +832,69 @@ private Query computeQuery(final QueryFeatureInspector 
queryFeatureInspector)
     throw new CannotBuildQueryException("Cannot convert query parts into an 
actual query");
   }
 
+  /**
+   * Return this query as a TimeBoundary query, or null if this query is not 
compatible with Timeseries.
+   *
+   * @return query

Review Comment:
   done



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