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

   ### What changes were proposed in this pull request?
   
   Test-only. Adds three `BinBySuite` cases covering how a re-output 
`DISTRIBUTE UNIFORM` column behaves in `ORDER BY` / `SELECT`. A `DISTRIBUTE 
UNIFORM` column is re-output as a produced attribute (SPARK-57858): the scaled 
value gets a fresh expression id, drops the input's qualifier and metadata, and 
replaces the input column in place.
   
   - a bare `ORDER BY` on a re-output DISTRIBUTE column that is not in the 
`SELECT` list resolves;
   - a source-qualified reference to a re-output DISTRIBUTE column 
(`metrics.value`) fails with `UNRESOLVED_COLUMN.WITH_SUGGESTION`, since the 
produced column no longer carries the source qualifier;
   - a file-source `_metadata` column stays reachable through `BIN BY` in both 
`ORDER BY` and `SELECT`.
   
   No production code change. Sub-task of SPARK-57133.
   
   ### Why are the changes needed?
   
   The interaction between the re-output (produced-attribute) DISTRIBUTE 
columns and hidden-output column resolution was not covered: a bare `ORDER BY` 
on a non-projected re-output column, a source-qualified reference to one, and 
metadata-column reachability through the operator. These tests pin the intended 
behavior and guard against regressions.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New unit tests. `build/sbt "sql/testOnly org.apache.spark.sql.BinBySuite"`.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   <complete per the ASF Generative Tooling Guidance before opening the PR>
   


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