[ 
https://issues.apache.org/jira/browse/SPARK-28589?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gengliang Wang updated SPARK-28589:
-----------------------------------
    Description: 
The type conversion in current Spark can be improved by learning from 
PostgreSQL:
1. The table insertion should disallow certain type conversions(string -> int), 
see 
https://docs.google.com/document/d/1b9nnWWbKVDRp7lpzhQS1buv1_lDzWIZY2ApFs5rBcGI/edit#heading=h.82w8qxfl2uwl
2. Spark should return null result on cast an out-of-range value to an integral 
type, instead of returning a value with lower bits.
3. We can have a new optional mode: throw runtime exceptions on casting failures
4. improve the implicit casting
etc..

  was:
The type conversion in current Spark can be improved by learning from 
PostgreSQL:
1. The table insertion should disallow certain type conversions(string -> int), 
see 
https://docs.google.com/document/d/1b9nnWWbKVDRp7lpzhQS1buv1_lDzWIZY2ApFs5rBcGI/edit#heading=h.82w8qxfl2uwl
2. Spark should return null result on cast an out-of-range value to an integral 
type, instead of returning a value with lower bits.
3. We can have a new optional mode: throw runtime exceptions on casting failures
4. improve the implicit casting



> Follow the type conversion rules of PostgreSQL
> ----------------------------------------------
>
>                 Key: SPARK-28589
>                 URL: https://issues.apache.org/jira/browse/SPARK-28589
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Gengliang Wang
>            Priority: Major
>         Attachments: type_conversion.txt
>
>
> The type conversion in current Spark can be improved by learning from 
> PostgreSQL:
> 1. The table insertion should disallow certain type conversions(string -> 
> int), see 
> https://docs.google.com/document/d/1b9nnWWbKVDRp7lpzhQS1buv1_lDzWIZY2ApFs5rBcGI/edit#heading=h.82w8qxfl2uwl
> 2. Spark should return null result on cast an out-of-range value to an 
> integral type, instead of returning a value with lower bits.
> 3. We can have a new optional mode: throw runtime exceptions on casting 
> failures
> 4. improve the implicit casting
> etc..



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to