You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "liupengcheng (Jira)" <ji...@apache.org> on 2020/10/09 13:16:00 UTC

[jira] [Commented] (CALCITE-4322) Inconsistent parameter types for splittable agg function

    [ https://issues.apache.org/jira/browse/CALCITE-4322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17210924#comment-17210924 ] 

liupengcheng commented on CALCITE-4322:
---------------------------------------

[~fan_li_ya] Can you provide more detailed exceptions? It sounds to be a bug of Calcite.

> Inconsistent parameter types for splittable agg function
> --------------------------------------------------------
>
>                 Key: CALCITE-4322
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4322
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Liya Fan
>            Assignee: Liya Fan
>            Priority: Major
>
> The \{{AggregateJoinTransposeRule}} rule often calls the \{{SqlSplittableAggFunction#topSplit}} method to split the workload of a agg call. 
> This may involve generating a multiply operator (e.g. see [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/SqlSplittableAggFunction.java#L302)]
> The problem is that the operands of the multiply can be different. For example, if the original agg call is a \{{sum}} on double values, here we would multiply a double with a big integer. 
> This is undesirable, as the \{{SqlStdOperatorTable#MULTIPLY}} uses \{{InferTypes.FIRST_KNOWN}} to infer operand types. That is, it assumes all parameters have the same type, and it uses the first known type to infer other operand types. 
> In our system, it causes the sql processing to crash. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)