ahshahid commented on PR #53658:
URL: https://github.com/apache/spark/pull/53658#issuecomment-3725269429

   > I think I moved all cases that handles `Not` into `transformNots`, or at 
least I wanted to do so... I believe we want to apply `transformNots` 
recursively to be able to push down the `Not` node as deep as possible, but I 
agree that we could use `transformDownWithPruning` instead of calling 
`transformNots` explicitely. Also, I don't see why it would make sense to 
handle other expressions while traversing down. IMO all we want to do is 
pushing the `Not` nodes down, but if you have a case when this is not 
sufficient then let's add a test.
   
   The benefit in the original PR as I see it is:
   1) No recursion
   2) No breaking of the code ( the idea being processing of subtree is no 
different from whole tree)
   3) No chance missing of cases ( like may be you want to test your code for 
inequalities of the form >=, <=, < , > etc).
   4) Less code and to me its easy to comprehend ( due to the idea of #2) 
   5) At the same time early return.
   I dont see any issue with the code or any missing case. so do not exactly 
understand the reason for futher change.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to