Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/844#discussion_r118923600
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/PlannerPhase.java ---
    @@ -180,9 +180,19 @@ public RuleSet getRules(OptimizerRulesContext context, 
Collection<StoragePlugin>
     
       PHYSICAL("Physical Planning") {
         public RuleSet getRules(OptimizerRulesContext context, 
Collection<StoragePlugin> plugins) {
    +      final RuleSet storageRules = getStorageRules(context, plugins, this);
    +
    +      final Builder<RelOptRule> newStorageRulesBuilder = 
ImmutableSet.builder();
    +      for (final RelOptRule relOptRule : storageRules) {
    +        // exclude ProjectRemoveRule to prevent Drill from losing column 
alias or displaying implicit columns
    +        if (!(relOptRule instanceof ProjectRemoveRule)) {
    --- End diff --
    
    Actually, you are right there is a bug in ProjectRemoveRule in Calcite [1]. 
Jira was open at the beginning of this year: ProjectRemoveRule loses field 
names [1].
    
    [1] https://issues.apache.org/jira/browse/CALCITE-1584
    



---
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.
---

Reply via email to