Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRILL-4693: Ensure final column re-ordering is done if any select li… #508

Closed
wants to merge 1 commit into from

Conversation

amansinha100
Copy link

…st expression is convert_fromjson.

@amansinha100
Copy link
Author

@jinfengni could you pls review ?

for (RexNode expr : this.exps) {
if (expr.getKind() == SqlKind.OTHER_FUNCTION &&
expr instanceof RexCall &&
((RexCall) expr).getOperator().getName().equalsIgnoreCase("CONVERT_FROMJSON")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add a comment. You should probably file a JIRA for the NPE.

@jinfengni
Copy link
Contributor

jinfengni commented May 26, 2016

LGTM.

+1

@asfgit asfgit closed this in 6ddd5fa May 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants