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