dtenedor commented on PR #60367:
URL: https://github.com/apache/spark/pull/60367#issuecomment-6991963124

   The summary-only finding of the last review, that the MERGE source mark 
survives only because each rewrite forwards it, is addressed in f04255df0c:
   
   - The `NULL_REFERENCE` and `RESOLVED_NULL_REFERENCE` docs, and the Tags 
paragraph of the PR description, now state that `TreeNode.copyTagsFrom` copies 
tags only into a node that has none. A node with a Dataset id or a Spark 
Connect plan id already has some. So code outside the analyzer that replaces or 
rebuilds an analyzed node must keep the mark with `withResolvedNullReferenceOf`.
   - `MergeIntoDataFrameSuite` now has two new chains:
     - a SQL `UNION` followed by `union`, `distinct`, and `union`;
     - the `distinct` of a SQL `UNION ALL` followed by the same.
   
     The first fails if the Distinct branch of `Dataset.flattenUnion` stops 
forwarding the mark, the second if the Deduplicate branch does. In both chains, 
the other operands have the VOID type of the query's column. With a BOOLEAN 
operand, the union puts a widening cast between the unions, and neither branch 
runs.
   - A new test covers `status? = 'deleted'` with ANSI mode on, and 
`size(tags?)`, with both analyzers: alone, after `union`, and after a self-join 
with a condition. Type coercion replaces the NULL of the reference in both, so 
each case fails if the analysis does not set the mark.
   


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