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

   ### What changes were proposed in this pull request?
   
   This PR proposes to sync the flag `isStreaming` from CTE definition to CTE 
reference. 
   
   The essential issue is that CTE reference node cannot determine the flag 
`isStreaming` by itself, and never be able to have a proper value and always 
takes the default as it does not have a parameter in constructor. The other 
flag `resolved` is handled, and we need to do the same for `isStreaming`.
   
   Once we add the parameter to the constructor, we will also need to make sure 
the flag is in sync with CTE definition. We have a rule `ResolveWithCTE` doing 
the sync, hence we add the logic to sync the flag `isStreaming` as well.
   
   ### Why are the changes needed?
   
   The bug may impact some rules which behaves differently depending on 
isStreaming flag. It would no longer be a problem once CTE reference is 
replaced with CTE definition at some point in "optimization phase", but all 
rules in analyzer and optimizer being triggered before the rule takes effect 
may misbehave based on incorrect isStreaming flag.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New UT.
   
   ### 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