mgaido91 commented on issue #23308: [SPARK-26308][SQL] Infer abstract decimal 
type for java/scala BigDecimal
URL: https://github.com/apache/spark/pull/23308#issuecomment-447852706
 
 
   No, but I think we can't fully support either in the way you suggested, as 
we cannot build a MapTye, ArrayType, StructType containing an abstract data 
type... So with your suggestion, we can determine if a cast is needed or not 
without considering the decimal precision and scale, but if we need to cast 
because of some other fields, we can't do that (eg. we expect a `struct(long, 
decimal)` and we get a `struct(int, decimal)`). So I think the case of complex 
data types needs the declaration of corresponding abstract versions accepting 
abstract data types anyway.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to