yaooqinn commented on PR #56009:
URL: https://github.com/apache/spark/pull/56009#issuecomment-4498348705

   Great catch on both points, @peter-toth, and thanks for the careful read. 
Updated the PR:
   
   **On the description example** — you are right, `range(10)` of 
`decimal(7,2)` sums to 45 and never overflows, so the "before=99999998 / 
after=NULL" snippet in the original description was misleading. I have 
rewritten the description to frame the user-visible change in terms of 
`evalMode` being preserved through the rewrite (which is observable directly on 
the optimized plan), and dropped the broken numeric example. Actually 
triggering a silent wrap on the JVM Long path requires `N` large enough that 
`Sum_unscaled > 2^63`, which isn't a clean docstring example.
   
   **On the un-widened Window arm at L2589/L2594** — yes, those two sites have 
the exact same bug, and they're directly reachable (input is a bare 
`AttributeReference`, no `ExtractWindowExpressions` hoisting in the way — that 
hoist only affects *composite* widening Cast children, which is a separate 
widened-cast Window-arm scope I'm tracking as a follow-up). I've expanded the 
fix from 4 to 6 sites, added two new tests covering un-widened Window SUM/AVG, 
and confirmed pre-fix both fail with `got ANSI` and post-fix all 37 pass.
   
   Force-pushed to `b95abfbb38a`.
   


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