mgaido91 commented on a change in pull request #24553: [SPARK-27604][SQL]
Enhance constant propagation
URL: https://github.com/apache/spark/pull/24553#discussion_r287555562
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/ConstantPropagationSuite.scala
##########
@@ -37,10 +38,11 @@ class ConstantPropagationSuite extends PlanTest {
Batch("ConstantPropagation", FixedPoint(10),
ConstantPropagation,
ConstantFolding,
- BooleanSimplification) :: Nil
+ BooleanSimplification,
+ PruneFilters) :: Nil
Review comment:
my question here was: why do we need to add this rule? I see it can avoid
having filters containing only `true` or `false` for instance, but is it really
needed to test the constant propagation? I mean, I expect the output to contain
useless filters in the plan, but that's fine: the goal of the tests is not to
get the best plan, but the correct one adn the less rules we have for testing a
specific one, the easier to debugger IMHO.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]