Github user jinfengni commented on a diff in the pull request:
https://github.com/apache/drill/pull/844#discussion_r123632779
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/DefaultSqlHandler.java
---
@@ -459,7 +468,13 @@ protected Prel convertToPrel(RelNode drel) throws
RelConversionException, SqlUns
/* The order of the following transformations is important */
/*
- * 0.) For select * from join query, we need insert project on top of
scan and a top project just
+ * 0.)
+ * Add top project before screen operator or writer to ensure that
final output column names are preserved.
+ */
+ phyRelNode = TopProjectVisitor.insertTopProject(phyRelNode,
validatedRowType);
--- End diff --
Make sense to me that you put this Visitor handling first, after physical
transform() call, before these existing visitor handling.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---