amansinha100 commented on a change in pull request #1401: DRILL-6616: Batch 
Processing for Lateral/Unnest
URL: https://github.com/apache/drill/pull/1401#discussion_r205916658
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/FilterPrel.java
 ##########
 @@ -81,4 +86,17 @@ public boolean needsFinalColumnReordering() {
     return true;
   }
 
+  @Override
+  public Prel addImplicitRowIDCol(List<RelNode> children) {
+    RexBuilder builder = this.getCluster().getRexBuilder();
+    return (Prel) this.copy(this.traitSet, children.get(0), 
DrillRelOptUtil.transformExpr(builder, condition, buildMap()));
+  }
+
+  private Map<Integer, Integer> buildMap() {
+    Map<Integer, Integer> map = new HashMap<>();
+    for (int i=0;i<this.getInput().getRowType().getFieldCount();i++) {
+      map.put(i, i+1);
 
 Review comment:
   Did you consider adding the implicit field at the end ?  That way you won't 
have to map all fields to their next index. 

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


With regards,
Apache Git Services

Reply via email to