[
https://issues.apache.org/jira/browse/IMPALA-11766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642070#comment-17642070
]
ASF subversion and git services commented on IMPALA-11766:
----------------------------------------------------------
Commit a74ca6b025a5d3ee98caacca09239aea22aa41d6 in impala's branch
refs/heads/master from Steve Carlin
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=a74ca6b02 ]
IMPALA-11766: In buildBinaryStatsPredicate, an Expr needs to be cloned
The following code in buildBinaryStatsPredicate has a potential bug:
// Obtain the rhs expr of the input predicate
Expr constExpr = inputPred.getChild(1);
...
BinaryPredicate statsPred = new BinaryPredicate(op, slot, constExpr);
The constExpr is mutable and the "new BinaryPredicate" can change
the object. If it does, it could have an adverse effect on inputPred.
Change-Id: I959f1ded63baba884391cbf23d7e59316838c8ef
Reviewed-on: http://gerrit.cloudera.org:8080/19291
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Daniel Becker <[email protected]>
Reviewed-by: Michael Smith <[email protected]>
> In HdfsScanNode.buildBinaryStatsPredicate, an Expr needs to be cloned
> ---------------------------------------------------------------------
>
> Key: IMPALA-11766
> URL: https://issues.apache.org/jira/browse/IMPALA-11766
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Steve Carlin
> Priority: Major
>
> In HdfsScanNode.buildBinaryStatsPredicate exists the following code:
> {code:java}
> private void buildBinaryStatsPredicate(Analyzer analyzer, SlotRef inputSlot,
> BinaryPredicate inputPred, BinaryPredicate.Operator op) {
> // Obtain the rhs expr of the input predicate
> Expr constExpr = inputPred.getChild(1);
> ...
> BinaryPredicate statsPred = new BinaryPredicate(op, slot,
> constExpr);{code}
> This contains a potential bug. The constExpr is mutable and the creation of
> the new BinaryPredicate can change the innards of the inputPred Expr.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]