You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by amansinha100 <gi...@git.apache.org> on 2016/05/26 00:25:12 UTC

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

GitHub user amansinha100 opened a pull request:

    https://github.com/apache/drill/pull/508

    DRILL-4693:  Ensure final column re-ordering is done if any select li\u2026

    \u2026st expression is convert_fromjson.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/amansinha100/incubator-drill DRILL-4693

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/508.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #508
    
----
commit eaf411c08329376cc8f185726b7b6db1cc8462e2
Author: Aman Sinha <as...@maprtech.com>
Date:   2016-05-25T22:33:56Z

    DRILL-4693:  Ensure final column re-ordering is done if any select list expression is convert_fromjson.

----


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

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on the pull request:

    https://github.com/apache/drill/pull/508#issuecomment-221749835
  
    LGGM.
    
    +1
    



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

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

Posted by amansinha100 <gi...@git.apache.org>.
Github user amansinha100 commented on a diff in the pull request:

    https://github.com/apache/drill/pull/508#discussion_r64677891
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ProjectPrel.java ---
    @@ -81,6 +83,18 @@ public SelectionVectorMode getEncoding() {
     
       @Override
       public boolean needsFinalColumnReordering() {
    +    for (RexNode expr : this.exps) {
    +      if (expr.getKind() == SqlKind.OTHER_FUNCTION &&
    +          expr instanceof RexCall &&
    +          ((RexCall) expr).getOperator().getName().equalsIgnoreCase("CONVERT_FROMJSON")) {
    --- End diff --
    
    Will add a comment.  You should probably file a JIRA for the NPE. 


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

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/drill/pull/508


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

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

Posted by jinfengni <gi...@git.apache.org>.
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/508#discussion_r64677344
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/ProjectPrel.java ---
    @@ -81,6 +83,18 @@ public SelectionVectorMode getEncoding() {
     
       @Override
       public boolean needsFinalColumnReordering() {
    +    for (RexNode expr : this.exps) {
    +      if (expr.getKind() == SqlKind.OTHER_FUNCTION &&
    +          expr instanceof RexCall &&
    +          ((RexCall) expr).getOperator().getName().equalsIgnoreCase("CONVERT_FROMJSON")) {
    --- End diff --
    
    Can you pls add a comment that convert_fromjson() currently can only used as a top level function (it can not be nested in other function)? Otherwise, we have to walk through the expression tree to check the existence of this function. 
    
    Tried with convert_to(convert_from(t.jsonstr, 'json'), 'json'), and it hit NPE in execution. 
    



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

[GitHub] drill pull request: DRILL-4693: Ensure final column re-ordering is...

Posted by amansinha100 <gi...@git.apache.org>.
Github user amansinha100 commented on the pull request:

    https://github.com/apache/drill/pull/508#issuecomment-221746191
  
    @jinfengni could you pls review ?


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