Jackie-Jiang commented on code in PR #13217:
URL: https://github.com/apache/pinot/pull/13217#discussion_r1614910988
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotQueryRuleSets.java:
##########
@@ -118,9 +118,7 @@ private PinotQueryRuleSets() {
);
// Pinot specific rules to run using a single RuleCollection since we attach
aggregate info after optimizer.
- public static final Collection<RelOptRule> PINOT_AGG_PROCESS_RULES =
ImmutableList.of(
- PinotAggregateLiteralAttachmentRule.INSTANCE
- );
+ public static final Collection<RelOptRule> PINOT_AGG_PROCESS_RULES =
ImmutableList.of();
Review Comment:
Let's remove this constant
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotAggregateExchangeNodeInsertRule.java:
##########
@@ -336,11 +349,13 @@ private RelNode
convertAggFromIntermediateInput(RelOptRuleCall ruleCall, Aggrega
// b/c the exchange produces intermediate results, thus the input to the
newCall will be indexed at
// [nGroup + oldCallIndex]
List<AggregateCall> oldCalls = oldAggRel.getAggCallList();
+ List<List<RexNode>> rexLists = extractRexLists(oldAggRel);
for (int oldCallIndex = 0; oldCallIndex < oldCalls.size(); oldCallIndex++)
{
AggregateCall oldCall = oldCalls.get(oldCallIndex);
// intermediate stage input only supports single argument inputs.
- List<Integer> argList = Collections.singletonList(nGroups +
oldCallIndex);
- AggregateCall newCall = buildAggregateCall(exchange, oldCall, argList,
nGroups, aggType);
+ List<Integer> argList = ImmutableList.of(nGroups + oldCallIndex);
Review Comment:
(minor)
```suggestion
List<Integer> argList = List.of(nGroups + oldCallIndex);
```
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RexExpression.java:
##########
@@ -128,11 +132,17 @@ public FunctionCall(SqlKind sqlKind, ColumnDataType
dataType, String functionNam
public FunctionCall(SqlKind sqlKind, ColumnDataType dataType, String
functionName,
List<RexExpression> functionOperands, boolean isDistinct) {
+ this(sqlKind, dataType, functionName, functionOperands, isDistinct,
ImmutableList.of());
Review Comment:
(minor)
```suggestion
this(sqlKind, dataType, functionName, functionOperands, isDistinct,
List.of());
```
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RexExpression.java:
##########
@@ -117,6 +118,9 @@ class FunctionCall implements RexExpression {
// whether the function is a distinct function.
@ProtoProperties
private boolean _isDistinct;
+ // the list of RexExpressions that represents the pre-args to the function.
+ @ProtoProperties
+ private List<RexExpression> _functionPreArgs;
Review Comment:
Trying to understand it better, why can't we reuse `_functionOperands` here
for literals?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]