silundong commented on PR #4267: URL: https://github.com/apache/calcite/pull/4267#issuecomment-2768176117
> @silundong I don't see anything trying to prevent the rule to be applied indefinitely. Now that we have the maximum expansion it might stop at some point but this won't prevent the rule to be tried. I have seen lots of similar problems leading to OOMs in the past, I think it's dangerous to integrate such a rule as-is, and most definitely I wouldn't put it into the standard core rules which get applied by default. @asolimando I have checked in `matchFilter` and `matchJoin` whether the expanded newCondition is equal to the original condition. If they are the same, it will be returned directly. For example the rule is matched for the first time and the condition is successfully expanded, a new Filter/Join is generated. When the rule is matched for the second time, the conditions that have been successfully expanded will not change, so it will be returned directly. I don't think it will be applied infinitely. Is there something else I haven't considered? -- 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]
