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

   ### What changes were proposed in this pull request?
   We introduce the SQLConf 
`spark.sql.legacy.avro.preventReadingIncorrectSameEncodedTypes` to prevent 
reading interval types as date or timestamp types to avoid getting corrupt 
dates as well as reading decimal types with incorrect precision.
   
   
   ### Why are the changes needed?
   We found the following issues with open source Avro:
   
   - Interval types can be read as date or timestamp types that would lead to 
wildly different results
   - Decimal types can be read with lower precision, that leads to data being 
read as `null` instead of suggesting that a wider decimal format should be 
provided
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   New unit test
   


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