[ https://issues.apache.org/jira/browse/CALCITE-5833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rong Rong updated CALCITE-5833: ------------------------------- Summary: Support literal parsing for AggregateCall (was: Support `getOperandLiteralValue` in `Aggregate.AggCallBinding`) > Support literal parsing for AggregateCall > ------------------------------------------ > > Key: CALCITE-5833 > URL: https://issues.apache.org/jira/browse/CALCITE-5833 > Project: Calcite > Issue Type: New Feature > Reporter: Rong Rong > Priority: Major > > I wasn't sure if this is the right way to support the feature please share > your feedback: > h2. goal > to support configuring aggregate function based on literal input fields, such > as > {code:sql} > SELECT > histogram(valCol1, 16), -- 16 bit precision of the final results > histogram(valCol2, 8) -- 8 bit precision of the final results > FROM tbl > {code} > h2. approach > I was trying to register a ReturnType inference by opBinding the 2nd literal > argument and create an explicit type based on the literal value. but it tells > me {{AggCallBinding}} doesn't implement {{getOpreandLiteralValue}} method, > should I > - add support for this method in aggregate call binding? it doesn't seems > easy consider there's no RexNode storage in this call binding > - change the {{AggregateCall#create}} method to infer the return type so that > we dont need to change the {{AggCallBinding}} -- This message was sent by Atlassian Jira (v8.20.10#820010)