vlsi commented on issue #1703: WIP: [CALCITE-2450] Reorder RexCall predicates 
to a canonical form
URL: https://github.com/apache/calcite/pull/1703#issuecomment-569614910
 
 
   > The plan changes, with same semantic but no promotion
   
   The key improvement here is performance improvement.
   There are several tests that get faster.
   For instance: 
org.apache.calcite.test.RelMetadataTest#testPullUpPredicatesForExprsItr
   There's an assert:
   
   ```
   assertThat(inputSet.pulledUpPredicates.size(), is(18));
   ```
   
   After the change it becomes `12`, so the test extracts less predicates, thus 
the planning becomes faster.
   
   
   Note: even though the plan representation change, it is "one-time" change.
   In other words, the plan would be sorted in exactly the same order, so the 
change would make plans **more stable** in the future.
   
   > we should keep as the same plan for same query/relational expression for 
different Calcite version
   
   It can't always be like that. A change to the optimizer might produce a 
slightly different plan.
   This PR improves performance across different tests, so it is a true 
performance improvement.
   
   However, I do not see the way to fully reproduce "old plan representation" 
because "old representation" is "a random one".

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to