You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/07/15 03:25:59 UTC

[GitHub] amansinha100 commented on a change in pull request #1381: DRILL-6475: Unnest: Null fieldId Pointer.

amansinha100 commented on a change in pull request #1381: DRILL-6475: Unnest: Null fieldId Pointer.
URL: https://github.com/apache/drill/pull/1381#discussion_r202530325
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/JoinPrelRenameVisitor.java
 ##########
 @@ -19,36 +19,70 @@
 
 import java.util.ArrayList;
 import java.util.List;
-
+import java.util.Map;
+import java.util.HashMap;
+
+import com.google.common.base.Preconditions;
+import org.apache.calcite.rel.type.RelDataType;
+import org.apache.calcite.rel.type.RelDataTypeField;
+import org.apache.calcite.rex.RexBuilder;
+import org.apache.calcite.rex.RexNode;
 import org.apache.drill.exec.planner.physical.JoinPrel;
 import org.apache.drill.exec.planner.physical.LateralJoinPrel;
 import org.apache.drill.exec.planner.physical.Prel;
 import org.apache.calcite.rel.RelNode;
 
 import com.google.common.collect.Lists;
+import org.apache.drill.exec.planner.physical.UnnestPrel;
 
 public class JoinPrelRenameVisitor extends BasePrelVisitor<Prel, Void, RuntimeException>{
 
+  private final Map<String, Prel> sourceOperatorRegistry = new HashMap();
+
   private static JoinPrelRenameVisitor INSTANCE = new JoinPrelRenameVisitor();
 
   public static Prel insertRenameProject(Prel prel){
     return prel.accept(INSTANCE, null);
   }
 
+  private void register(Prel toRegister) {
+    this.sourceOperatorRegistry.put(toRegister.getClass().getSimpleName(), toRegister);
 
 Review comment:
   It is odd to register the mapping of class name to the Prel.  The association of a LateralJoin to Unnest should ideally be done through instances of the class.  i.e  a particular Unnest instance is associated with a particular Lateral instance (each Lateral can be associated with multiple Unnest instances), otherwise there is potential for bugs due to incorrect association.    Thoughts ? 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services