julianhyde commented on a change in pull request #1078: [CALCITE-896] Remove 
Aggregate if grouping columns are unique and all functions are splittable
URL: https://github.com/apache/calcite/pull/1078#discussion_r261430446
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/SqlSplittableAggFunction.java
 ##########
 @@ -173,11 +173,11 @@ public RexNode singleton(RexBuilder rexBuilder, 
RelDataType inputRowType,
       final RexNode predicate =
           RexUtil.composeConjunction(rexBuilder, predicates, true);
       if (predicate == null) {
-        return rexBuilder.makeExactLiteral(BigDecimal.ONE);
+        return rexBuilder.makeBigintLiteral(BigDecimal.ONE);
 
 Review comment:
   Let's not assume that COUNT is BIGINT. (In some type systems it might be 
INT.) Use AggregateCall.type?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to