You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Liya Fan (Jira)" <ji...@apache.org> on 2020/10/09 12:26:00 UTC
[jira] [Created] (CALCITE-4322) Inconsistent parameter types for
splittable agg function
Liya Fan created CALCITE-4322:
---------------------------------
Summary: 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
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)