FrankChen021 commented on pull request #10949:
URL: https://github.com/apache/druid/pull/10949#issuecomment-819423526


   > > SQL query on re-indexed columns with double/float/long first and last 
aggregators WON'T work. This involves some changes in complex type handling 
which might be better in another PR.
   > 
   > What happens when a user issues the `EARLIEST(expr, maxBytesPerString)` 
function on a longFirst column - do we expect that it will fail? Is the error 
message in this case clear?
   > 
   > I'm asking because it looks like #10332 added handling of complex type 
columns, which used to be ok because stringFirst/Last was the only type of 
complex column. But now that we've introduced these column types, the expected 
behavior is less clear. Perhaps you can add some tests to CalciteQueryTest to 
validate the behavior that we want users to see when they issue sql queries on 
these column types.
   
   EARLIEST/LATEST both work well for stringFirst/Last columns. They also work 
for none double/float/longFirst/Last columns.
   
   For double/long/floatFirst/Last columns, following exception message is 
returned
   
   ```
   Error: Plan validation failed
   
   org.apache.calcite.runtime.CalciteContextException: From line 3, column 3 to 
line 3, column 24: Cannot apply 'EARLIEST' to arguments of type 
'EARLIEST(<OTHER>)'. Supported form(s): 'EARLIEST(<NUMERIC>)' 
'EARLIEST(<BOOLEAN>)' 'EARLIEST(expr, maxBytesPerString)'
   
   org.apache.calcite.tools.ValidationException
   ```


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

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