maytasm commented on PR #16849:
URL: https://github.com/apache/druid/pull/16849#issuecomment-2623163755

   @clintropolis @gianm 
   I think this PR broke dataSourceMetadata query.
   Seems like MaxIngestedEventTimeInspector in DataSourceMetadataQueryRunner 
will always be null.
   This can be reproduced with the wikipedia dataset.
   Just run
   ```
   {
   "queryType" : "dataSourceMetadata",
   "dataSource" : "wikipedia"
   }
   ```
   The "maxIngestedEventTime" returned is -146136543-09-08T08:23:32.096Z is 
wrong.
   
   Doesn't look like this code:
   ```
     @SuppressWarnings("unchecked")
     @Nullable
     @Override
     public <T> T as(@Nonnull Class<T> clazz)
     {
       final Function<QueryableIndexSegment, ?> fn = AS_MAP.get(clazz);
       if (fn != null) {
         final T fnApply = (T) fn.apply(this);
         if (fnApply != null) {
           return fnApply;
         }
       }
   
       if (TimeBoundaryInspector.class.equals(clazz)) {
         return (T) timeBoundaryInspector;
       } else if (Metadata.class.equals(clazz)) {
         return (T) index.getMetadata();
       } else if (PhysicalSegmentInspector.class.equals(clazz)) {
         return (T) new QueryableIndexPhysicalSegmentInspector(index);
       } else if (TopNOptimizationInspector.class.equals(clazz)) {
         return (T) new SimpleTopNOptimizationInspector(true);
       }
   
       return Segment.super.as(clazz);
     }
     ```
   Is handling MaxIngestedEventTimeInspector?


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