[
https://issues.apache.org/jira/browse/CALCITE-5833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743326#comment-17743326
]
Rong Rong commented on CALCITE-5833:
------------------------------------
did a bit of a research. it doesn't seems like I interpret the RexList properly
it seems like it is only set when LITERAL_AGG is set to true (see:
CALCITE-4334)
any suggestions are highly appreciated
> 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)