arina-ielchiieva commented on a change in pull request #1492: DRILL-6773: The 
renamed schema with aliases is not shown for queries on empty directories
URL: https://github.com/apache/drill/pull/1492#discussion_r223058975
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/visitor/StarColumnConverter.java
 ##########
 @@ -118,13 +118,23 @@ private Prel insertProjUnderScreenOrWriter(Prel prel, 
RelDataType origRowType, P
     RelDataType newRowType = 
RexUtil.createStructType(child.getCluster().getTypeFactory(),
         exprs, origRowType.getFieldNames(), null);
 
-    int fieldCount = prel.getRowType().isStruct()? 
prel.getRowType().getFieldCount():1;
+    int fieldCount = prel.getRowType().isStruct() ? 
prel.getRowType().getFieldCount() : 1;
 
     // Insert PUS/PUW : remove the prefix and keep the original field name.
-    if (fieldCount > 1) { // // no point in allowing duplicates if we only 
have one column
-      proj = new ProjectAllowDupPrel(child.getCluster(), child.getTraitSet(), 
child, exprs, newRowType);
+    if (fieldCount > 1) { // no point in allowing duplicates if we only have 
one column
+      proj = new ProjectAllowDupPrel(child.getCluster(),
+          child.getTraitSet(),
+          child,
+          exprs,
+          newRowType,
+          true);
 
 Review comment:
   Please add explanation about this change.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to