impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4574: Do not treat UUID() like a constant expr.
Date Fri, 02 Dec 2016 19:32:17 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-4574: Do not treat UUID() like a constant expr.

Patch Set 1:

Commit Message:

Line 23: 1. Pass a flag from FE to BE for ever Expr indicating its constness.
> I think there are two low-risk ways we could solve the problem.
I think my current patch and both of your suggestions are throw-away work. We are very likely
going to change it completely in the future, so at this point I'd prefer the solution which
is minimally invasive. I agree your proposals are simpler than my listed alternatives here,
but they are still not as simple as this patch.
File be/src/exprs/

Line 261:   if ( == "rand" || == "random"
> Are the names always converted to lower case?
Yes. See FunctionName#analyzeFnNamePath().
File fe/src/main/java/org/apache/impala/analysis/

Line 245:     // Non-deterministic functions are never constant.
> If we're sticking with this solution, should add comments that cross-refere

Line 246:     if (fnName.equalsIgnoreCase("rand") || fnName.equalsIgnoreCase("random")
> I think we still need to consider what to do about non-deterministic UDFs. 
Agree that we need to deal with such UDFs in a more principled way.

I don't think we need to add extra flags or logic. You can disable constant folding with enable_expr_rewrites=false,
so there is a workaround for this hopefully exotic case of non-deterministic UDFs that are
invoked with no or only constant arguments.
File testdata/workloads/functional-query/queries/QueryTest/exprs.test:

Line 2579: select count(*) from functional.alltypestiny group by uuid()
> Can you add a test where UUID() is an argument to an operator or function? 
I modified this one like you suggested.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: If2499f5f6ecdcb098623202c8e6dc2d02727194a
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message