damnMeddlingKid opened a new issue #10643:
URL: https://github.com/apache/druid/issues/10643


   ### Affected Version
   
   Tested in druid 0.20.0
   
   ### Description
   
   Steps to reproduce
   
   1) Turn on SQL null handling using druid.generic.useDefaultValueForNull=false
   2) Run a query that returns a null value for a time column such as 
   ```
   SELECT MAX(__time) as t1, MAX(__time) FILTER(WHERE dim1 = 'non_existing') as 
t2 FROM druid.foo
   ```
   in this case there are no rows matching the filtered aggregate so the value 
returned 
[here](https://github.com/apache/druid/blob/master/sql/src/main/java/org/apache/druid/sql/http/SqlResource.java#L135)
 is null. 
   
   3) A NullPointer exception is logged in the broker but since results are 
streamed the client receives a 200 with partial results.
   
   
   this is occurring because we're trying to format the time column values 
without first checking if they're null
   
   


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