You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/06/30 10:14:02 UTC
[GitHub] [doris] EmmyMiao87 commented on a diff in pull request #10499: [Feature](neireids) Add support of ProjectNode in PlanTranslator
EmmyMiao87 commented on code in PR #10499:
URL: https://github.com/apache/doris/pull/10499#discussion_r910847024
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/translator/PhysicalPlanTranslator.java:
##########
@@ -138,8 +147,13 @@ public PlanFragment visitPhysicalOlapScan(
List<Slot> slotList = olapScan.getOutput();
PhysicalOlapScan physicalOlapScan = olapScan.getOperator();
OlapTable olapTable = physicalOlapScan.getTable();
+ List<Expr> execConjunctsList = physicalOlapScan
+ .getExpressions()
+ .stream()
+ .map(e -> ExpressionTranslator.convert(e, context)).collect(Collectors.toList());
TupleDescriptor tupleDescriptor = generateTupleDesc(slotList, context, olapTable);
OlapScanNode olapScanNode = new OlapScanNode(context.nextNodeId(), tupleDescriptor, olapTable.getName());
Review Comment:
All to thrift properties should be assigned in the translator, otherwise be cannot execute the query.
Please check the properties of each PlanNode and add.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/translator/PhysicalPlanTranslator.java:
##########
@@ -138,8 +147,13 @@ public PlanFragment visitPhysicalOlapScan(
List<Slot> slotList = olapScan.getOutput();
PhysicalOlapScan physicalOlapScan = olapScan.getOperator();
OlapTable olapTable = physicalOlapScan.getTable();
+ List<Expr> execConjunctsList = physicalOlapScan
+ .getExpressions()
+ .stream()
+ .map(e -> ExpressionTranslator.translate(e, context)).collect(Collectors.toList());
TupleDescriptor tupleDescriptor = generateTupleDesc(slotList, context, olapTable);
OlapScanNode olapScanNode = new OlapScanNode(context.nextNodeId(), tupleDescriptor, olapTable.getName());
+ olapScanNode.addConjuncts(execConjunctsList);
context.addScanNode(olapScanNode);
Review Comment:
Vectorized and non-vectorized code use different properties, such as `vconjunct` and `conjuncts`.
Our principle is that the properties used by both engines need to be translated before the vectorized code is stable.
After the vectorized code runs stably, the useless code can be deleted
--
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org