vvivekiyer commented on issue #10318:
URL: https://github.com/apache/pinot/issues/10318#issuecomment-1451073873

   Based on offline conversation with Rong, we've agreed to have the return 
type as follows
   > INT, LONG, FLOAT, DOUBLE -> return DOUBLE
   > BIG_DECIMAL -> return BIG_DECIMAL
   
   I'll propose a PR to fix the return type for BIG_DECIMAL. 
   
   We considered two other alternative approaches:
   1. Use the formula similar to postgres above. But that's not feasible in 
Pinot as the planner doesn't have details about table size or # of records.  We 
also don't store this metadata in TableCache or Zk.
   2. As AVG is converted to SUM / Count() , we thought we could use Calcite's 
deriveDecimalType here to determine the type. But given that the default return 
type of COUNT() is always BIG_INT, this would not help 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: 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