zstan commented on a change in pull request #9103: URL: https://github.com/apache/ignite/pull/9103#discussion_r643806456
########## File path: modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/FunctionsTest.java ########## @@ -86,7 +86,9 @@ public void testRange() { "Increment can't be 0"); } - /** */ + /** Important! Don`t change query call sequence in this test. This also tests correctness of + * {@link org.apache.ignite.internal.processors.query.calcite.exec.exp.ExpressionFactoryImpl#SCALAR_CACHE} usage. Review comment: oh, for now i understand !)) Look https://github.com/apache/ignite/pull/9103/files#diff-d8943f23a308c8461f57a1486e8f0f748884f55bf0d3cfd3deb29174d7b29261R329 this is not only my caprice, without this change in digit we will get unrelevant cached results from scalar map, for reproduce you need to comment cache mentioned above (shuttle) and additionally reorder the test func calling. I checked it with 2 and 3 query reordering, this ones : checkQuery("SELECT t._val FROM \"test\".Integer t WHERE t._val < 5 AND " + "EXISTS (SELECT x FROM table(system_range(t._val, t._val)) WHERE mod(x, 2) = 0) ") checkQuery("SELECT t._val FROM \"test\".Integer t WHERE t._val < 5 AND " + "NOT EXISTS (SELECT x FROM table(system_range(t._val, t._val)) WHERE mod(x, 2) = 0) ") -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org