LakeShen commented on code in PR #3316:
URL: https://github.com/apache/calcite/pull/3316#discussion_r1265353606
##########
core/src/test/java/org/apache/calcite/rex/RexProgramTest.java:
##########
@@ -801,6 +804,17 @@ private void checkExponentialCnf(int n) {
and(eRef,
or(fRef,
and(gRef, or(trueLiteral, falseLiteral)))))))));
+
Review Comment:
> Did you make sure the test fails with the original `HashMap`
implementation?
Hi @asolimando ,I tested with tpc-h q19.sql,and I printed some information
before and after calling the method RexUtil.pullFactors,at the same time, in my
program, I monitor all tpch sql plans, and if the plan changes, my program will
sense.

In the picture above,simplifiedCondition is the RexNode before entering the
RexUtil.pullFactors method,factors.values() represents the result of calling
RexUtil.CnfHelper#commonFactors , after pullFactors is the RexNode after
entering the RexUtil.pullFactors method.As you can see,RexNode might be
different after entering the method RexUtil.pullFactors.
After I changed the HashMap of RexUtil.CnfHelper#commonFactors to
LinkedHashMap, the above problem never appeared again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]