metanil commented on PR #55885:
URL: https://github.com/apache/spark/pull/55885#issuecomment-6938283272

   @peter-toth thanks. All of 28 to 35 are in `58a6d79`, with the earlier 
`0a710a2`. Each new test fails with its fix reverted, and the PR's suites are 
green: 103 in catalyst, 723 in sql.
   
   - **28**: your narrow version. Alias projection skips only a transform's own 
literal children, tracked by identity, and any other literal maps to its alias 
again. The new `ProjectedOrderingAndPartitioningSuite` case is the one you 
described, `HashPartitioning(a, 0)` under `0 AS z` reporting `(a, z)`. It fails 
with the global skip, and the three transform-parameter tests fail with no skip 
at all.
   - **29**: your `withNewChildrenInternal` rebuild, so the partner's shape 
follows every rewrite, broadcast expansion and alias projection included. A 
`TransformExpressionSuite` case rewrites both sides of one reduce over `x + 1` 
and `z + 1` and checks that they still share a key space and a column member 
doesn't.
   - **30**: your second option. `EnsureRequirements` asks for the reducers 
once, before the push branch, and if a position the pair was admitted on 
through a reducer has none on that ask, it falls back to the shuffle. The test 
is an end-to-end join with a bucket whose deprecated reducer fails only under 
`reducersBothWays`: `bucket(16)` against `bucket(12)` returns 48 rows, 12 
without the check.
   - **31**: the restore line now says it drops every V2 scan's reported 
partitioning, so `identity` joins and keyed aggregates go with it.
   - **32**: your `|| function == other.function`. The deprecated-only join 
test below also runs a fixture that keeps the default `canonicalName()`, which 
shuffles without it.
   - **33**: your end-to-end test, for (4, 2), (2, 4) and (6, 4), with the 
deprecated-only fixture and the default-name one.
   - **34**: the reducer WARNs are keyed by the function's class, and the 
failure's class for `reducerThrew:`. Five checks of a default-name pair log at 
most one WARN; keyed by name they logged ten.
   - **35**: all four comments, the struct-field test now compares two struct 
columns and checks the negative case against the struct itself, and 
`callArguments` is inlined.
   
   Few other commits:
   - `0a710a2`: a transform with no literal parameter no longer asks the 
connector for `inputTypes()`, so a parameterless pair whose `inputTypes()` 
throws reduces as on master.
   - `58a6d79`: integer truncate now runs end to end. The test table computes 
integer truncate keys, and there are tests for `truncate(4)` against 
`truncate(6)`, both reducing onto 12 without a shuffle, a join above that 
reduce, an identity side reduced onto integer truncate and a side shuffled onto 
it. That is the first end-to-end run of the two-sided reduce and the partner 
rewrite. Also a test that a transform argument may be any `NamedReference`, and 
the migration note says only a transform with a single column argument reports 
its partitioning.
   
   
   On the opt-out: agreed, I was also thinking from the same perspective, but 
was wondering if I have to exactly replicate previous behavior of `truncate`. 
Ok, so no conf. The migration note has the corrected restore line instead. 
Thanks for the input @peter-toth 
   
   


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