shauryachats opened a new pull request, #15052:
URL: https://github.com/apache/pinot/pull/15052

   A bug exists in GAPFILL queries. Aliased columns in subqueries within 
GAPFILL are not correctly referenced, causing a `NullPointerException` to be 
thrown. This issue happens for almost all types of GAPFILL queries 
(`AGGREGATE_GAPFILL`, `AGGREGATE_GAPFILL_AGGREGATE`, `SELECT_GAPFILL`). 
   
   Example query:
   ```
   SELECT time_bucket,
     count(*)
   from (
       SELECT GAPFILL(
           alias_created_at_timestamp,
           '1:SECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss',
           '2018-01-01 11:00:00',
           '2018-01-02 12:00:00',
           '1:HOURS',
           FILL(0, 'FILL_DEFAULT_VALUE'),
           TIMESERIESON(alias_type)
         ) as time_bucket,
         cnt,
         alias_type
       from (
           select DATETIMECONVERT(
               created_at_timestamp,
               '1:MILLISECONDS:EPOCH',
               '1:SECONDS:SIMPLE_DATE_FORMAT:yyyy-MM-dd HH:mm:ss',
               '1:HOURS'
             ) as alias_created_at_timestamp,
             cast(type as varchar) as alias_type,
             count(*) as cnt
           from githubComplexTypeEvents
           group by 1,
             2
           order by 3 desc
           limit 1000
         )
       limit 20000
     )
   group by 1
   ```
   


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to