Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/844#discussion_r118802952
  
    --- 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 --
    
    For query  "select version as current_version from t;", why will 
ProjectRemoveRule think that the Project operator is a trivial project? I 
assume that the input/output's field name is different.
    
    If there is bug in ProjectRemoveRule, it's better to fix that, in stead of 
removing it completely. 



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to