HeartSaVioR opened a new pull request, #45406:
URL: https://github.com/apache/spark/pull/45406

   ### What changes were proposed in this pull request?
   
   This PR proposes to fix PruneFilters to tag the isStreaming flag of 
LocalRelation correctly when the plan has both batch and streaming.
   
   ### Why are the changes needed?
   
   When filter is evaluated to be always false, PruneFilters replaces the 
filter with empty LocalRelation, which effectively prunes filter. The logic 
cares about migration of the isStreaming flag, but incorrectly migrated in some 
case, via picking up the value of isStreaming flag from root node rather than 
filter (or child).
   
   isStreaming flag is true if the value of isStreaming flag from any of 
children is true. Flipping the coin, some children might have isStreaming flag 
as "false". If the filter being pruned is a descendant to such children (in 
other word, ancestor of streaming node), LocalRelation is incorrectly tagged as 
streaming where it should be batch.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New UT verifying the fix. The new UT fails without this PR and passes with 
this PR.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


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