morrySnow commented on code in PR #33531:
URL: https://github.com/apache/doris/pull/33531#discussion_r1560648790
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/RuntimeFilterTranslator.java:
##########
@@ -110,29 +104,32 @@ public void createLegacyRuntimeFilter(RuntimeFilter
filter, JoinNodeBase node, P
for (int i = 0; i < filter.getTargetExpressions().size(); i++) {
Slot curTargetSlot = filter.getTargetSlots().get(i);
Expression curTargetExpression =
filter.getTargetExpressions().get(i);
- Expr target =
context.getExprIdToOlapScanNodeSlotRef().get(curTargetSlot.getExprId());
- if (target == null) {
+ SlotRef targetSlotRef =
context.getExprIdToOlapScanNodeSlotRef().get(curTargetSlot.getExprId());
+ if (targetSlotRef == null) {
context.setTargetNullCount();
hasInvalidTarget = true;
break;
}
ScanNode scanNode =
context.getScanNodeOfLegacyRuntimeFilterTarget().get(curTargetSlot);
Expr targetExpr;
if (curTargetSlot.equals(curTargetExpression)) {
- targetExpr = target;
+ targetExpr = targetSlotRef;
} else {
// map nereids target slot to original planner slot
- Map<Slot, Expr> slotMap = Maps.newHashMap();
- slotMap.put(curTargetSlot, target);
- RuntimeFilterExpressionTranslator translator = new
RuntimeFilterExpressionTranslator(slotMap);
+
Preconditions.checkArgument(curTargetExpression.getInputSlots().size() == 1,
+ "target expression is invalid, input slot num > 1;
filter :" + filter);
+ Slot slotInTargetExpression =
curTargetExpression.getInputSlots().iterator().next();
+
Preconditions.checkArgument(slotInTargetExpression.equals(curTargetSlot)
+ ||
curTargetSlot.equals(context.getAliasTransferMap().get(slotInTargetExpression).second));
Review Comment:
add check msg
--
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]