LakshSingla commented on PR #15700:
URL: https://github.com/apache/druid/pull/15700#issuecomment-1898339465

   Thanks for the first PR to Druid! 🚀 
   
   A few high level comments with regards to this
   1. What's the behaviour if the underlying relation has 0 rows. Shoud it 
throw an exception, replace it with null, or replace it with some dummy value 
(0.0 for floats, 0 for longs etc). We'd have to see what the SQL standard is or 
what other DBs commonly do and model the aggregation on top of it.
   2. String and Complex types need to be modeled as well. For string types, it 
can be invoked if used with aggregations like `STRLEN`
   ```sql
   SELECT  
   count(*)
    FROM "wiki"
    where 
     col1  >= STRLEN(SELECT dim1 FROM single_row_relation)
   ```
   and with complex types, it can be invoked with functions performing 
finalization on the complex types, or something like `PAIR_LEFT` (not yet added 
into Druid though). **However** the complex use case seems far-fetched enough, 
that we should be fine with saying we don't support such a use case. The 
Calcite (or the user) can probably optimize and pushdown the aggregation as 
well.
   3. Can we implement vector versions of the aggregator as well?


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