[
https://issues.apache.org/jira/browse/CALCITE-5280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608974#comment-17608974
]
Bertil Chapuis edited comment on CALCITE-5280 at 9/25/22 11:04 AM:
-------------------------------------------------------------------
I now better understand how the SqlValidator works and I believe that naming
scalar and aggregate functions differently is the right approach. When
determining if a function is an aggregate, the validator simply checks if one
of the matching functions is an aggregate. The number of operands, their type,
and the precedence of scalar function over aggregate functions are not taken
into account. This leads to the bug mentioned above, which is the result of
misclassifying a scalar function as an aggregate function. Changing this
behaviour would be nice, but I guess it has major ramifications.
was (Author: bchapuis):
I now better understand how the SqlValidator internals and I believe that
naming scalar and aggregate functions differently is the right approach. When
determining if a function is an aggregate, the validator simply checks if one
of the matching functions is an aggregate. The type of operands, the number of
operands and the precedence of scalar function over aggregate functions are not
taken into account. This leads to the bug mentioned above, which is the result
of misclassifying a scalar function as an aggregate function. Changing this
behaviour would be nice, but I guess it has major ramifications.
> Implement geometry aggregate functions
> --------------------------------------
>
> Key: CALCITE-5280
> URL: https://issues.apache.org/jira/browse/CALCITE-5280
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Bertil Chapuis
> Assignee: Bertil Chapuis
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Geometry aggregate functions (ST_Accum, ST_Collect, and ST_Union) are
> currently missing in Calcite. Using an AggregateFunctionImpl looks be pretty
> straightforward, but many aggregate function implement SqlAggFunction
> directly.
> [~julianhyde] What would be the best way to implement them?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)