gengliangwang commented on PR #55934:
URL: https://github.com/apache/spark/pull/55934#issuecomment-4520907477

   @viirya thanks for the careful review and the equivalence verification.
   
   Pushed `effb4aa` to address both readability nits:
   
   1. `castFractionToIntegralTypeCode` — the inner `from match` now has an 
explicit `case _ => throw SparkException.internalError(...)` default arm, so 
adding a new fractional type without updating this helper fails loudly at 
codegen time instead of silently turning into a `MatchError`.
   2. `castIntegralTypeToIntegralTypeExactCode` — the `int` branch is now 
structured as `from match { case LongType => LongExactNumeric; case _ => 
internalError }` for symmetry with `castFractionToIntegralTypeCode` and with 
the byte/short branches. Also added a one-line comment noting "Only LongType 
reaches this branch today (`castToIntCode` gates on `case LongType`)".
   
   (Plus `c966bd9` — a small fixup removing a duplicate `} else {` introduced 
when one of the github-ui suggestions landed.)
   
   `lint-scala` clean, 307/307 cast tests pass.


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