spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vatsal <vatsal.mev...@live.com>
Subject Re: Reasoning behind fail safe behaviour of cast expression
Date Thu, 19 Mar 2020 06:08:38 GMT
The example query didn't get posted in the previous email.
Adding it here:

> spark.sql("select cast((id || 'name') as int) from range(10) ").show
> +---------------------------------------------+
|CAST(concat(CAST(id AS STRING), name) AS INT)|
+---------------------------------------------+
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
|                                         null|
+---------------------------------------------+




--
Sent from: http://apache-spark-user-list.1001560.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscribe@spark.apache.org


Mime
View raw message