drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinfengni <...@git.apache.org>
Subject [GitHub] drill pull request #844: DRILL-5538: Exclude ProjectRemoveRule during PHYSIC...
Date Fri, 26 May 2017 23:02:30 GMT
Github user jinfengni commented on a diff in the pull request:

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

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

View raw message