[CALCITE-3346] Enable some ignored tests in RelOptRuleTests#1453
Conversation
b0d30ee to
9147394
Compare
|
To re-enable ignored tests is definitely a good idea. I will spend some time to check how those ignored tests in PR work(I see some changes on tests and not sure if they have changed intentions of original tests). Meanwhile, I am seeing other style fixes in this PR. Maybe it's better to send a hot fix PR to fix those styles than mixing with |
Thanks @amaliujia . It will be helpful with someone to check again. |
amaliujia
left a comment
There was a problem hiding this comment.
Do you have recommendation on who could be better person to review this PR?
| </Resource> | ||
| <Resource name="planBefore"> | ||
| <![CDATA[ | ||
| LogicalTableModify(table=[[CATALOG, SALES, DEPT]], operation=[INSERT], flattened=[false]) |
There was a problem hiding this comment.
I can see what's being tested here, but not sure if it is the original intention of that ignored test as you have added a SELECT there. I guess the original test is used to test if NULL works when applying ValuesReduceRule, and the new test does not include it.
Will need a committer who is more familiar with optimization to take a look then.
There was a problem hiding this comment.
I update the PR, add the NULL case.
| <Resource name="planAfter"> | ||
| <![CDATA[ | ||
| LogicalCalc(expr#0..10=[{inputs}], expr#11=[=($t7, $t9)], expr#12=['Propane':VARCHAR(10)], expr#13=[=($t10, $t12)], expr#14=[AND($t11, $t13)], DNAME=[$t10], ENAME=[$t1], $condition=[$t14]) | ||
| LogicalJoin(condition=[true], joinType=[inner]) |
There was a problem hiding this comment.
Not sure when this optimization could be useful: it change a inner equi-join to cross join and move the filter to Calc. So it's doing a filter moving up.
Also need a better person to check this one.
There was a problem hiding this comment.
Yes, that's the purpose of JoinExtractFilterRule. It isn't widely used, but it is a valid transformation. Don't worry too much about whether these are "optimizations"; just ask whether they are semantically valid rewrites.
There are quite a few rules that are useful in matching materialized views that do not seem to make the plan cheaper.
I can help to review, but maybe the weekend, i'm so busy this week days. |
8cc1568 to
46c0bb2
Compare
b840a1b to
f53952e
Compare
|
The Use your judgment to create tests that are readable, clear, maintainable, without too much redundancy. |
|
@danny0405 , what do you think? |
If i understand correctly, Julian means to do more refactoring for the method so it looks more concise ? Or we should revert the change @julianhyde ? |
|
how about this time, I make a refactor. |
Thanks for the effort, now the tests looks the same as others, which is more intuitive, i'm +1 for this. @julianhyde , do you have any objections ? |
|
+1 Looks great after refactor. |
This PR tries to re-enable some ignored tests in RelOptRuleTests.