gargvishesh commented on code in PR #15095:
URL: https://github.com/apache/druid/pull/15095#discussion_r1354706186


##########
sql/src/main/java/org/apache/druid/sql/calcite/aggregation/builtin/EarliestLatestAnySqlAggregator.java:
##########
@@ -313,12 +328,48 @@ public RelDataType inferReturnType(SqlOperatorBinding 
sqlOperatorBinding)
     }
   }
 
+  private static class TimeColIdentifer extends SqlIdentifier
+  {
+
+    public TimeColIdentifer()
+    {
+      super("__time", SqlParserPos.ZERO);
+    }
+
+    @Override
+    public <R> R accept(SqlVisitor<R> visitor)

Review Comment:
   Had tried that initially. Later found that before `validate` of an operator 
is invoked, the identifiers are changed into fully qualified names with table 
prefixes. It's at that time the `__time` col's existence is examined (and 
`accept` gets called) where a col missing exception can potentially be 
triggered. 



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