mbutrovich commented on PR #4090:
URL: 
https://github.com/apache/datafusion-comet/pull/4090#issuecomment-4327872544

   Thanks @andygrove! I double-checked Spark's logic and the scale-narrowing 
guard looks right for preventing silent truncation.
   
   Spark's `isDecimalTypeMatched` (line 1169 of 
`ParquetVectorUpdaterFactory.java`) requires exact scale match, so scale 
widening like Decimal(10,2) -> Decimal(10,4) would also be rejected by Spark's 
vectorized reader but passes through here. The PR description explains why 
that's fine (lossless cast), which makes sense. Would it be worth noting that 
in the code comment so future readers don't have to check the PR description?


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