adarshsanjeev opened a new issue, #13824:
URL: https://github.com/apache/druid/issues/13824

   Aggregations which implicitly depend on the "__time" column (such as 
LATEST() or EARLIEST()) when performed on an extern source in MSQ would result 
in the values for time defaulting to null.
   The same also occurs for non MSQ queries for the same aggregations on a 
lookup as the source (as __time is not present).
   
   This can be reproduced with the following query:
   
   ```
   WITH "ext" AS (SELECT *
   FROM TABLE(
     EXTERN(
       
'{"type":"http","uris":["https://druid.apache.org/data/wikipedia.json.gz"]}',
       '{"type":"json"}',
       
'[{"name":"isRobot","type":"string"},{"name":"channel","type":"string"},{"name":"timestamp","type":"string"},{"name":"flags","type":"string"},{"name":"isUnpatrolled","type":"string"},{"name":"page","type":"string"},{"name":"diffUrl","type":"string"},{"name":"added","type":"long"},{"name":"comment","type":"string"},{"name":"commentLength","type":"long"},{"name":"isNew","type":"string"},{"name":"isMinor","type":"string"},{"name":"delta","type":"long"},{"name":"isAnonymous","type":"string"},{"name":"user","type":"string"},{"name":"deltaBucket","type":"long"},{"name":"deleted","type":"long"},{"name":"namespace","type":"string"},{"name":"cityName","type":"string"},{"name":"countryName","type":"string"},{"name":"regionIsoCode","type":"string"},{"name":"metroCode","type":"long"},{"name":"countryIsoCode","type":"string"},{"name":"regionName","type":"string"}]'
     )
   ))
   SELECT
     TIME_PARSE("timestamp") AS "__time",
     LATEST("comment",1024)
   FROM "ext"
   GROUP BY 1
   ```
   with query context 
   `"finalizeAggregations": false`
   
   


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