You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When casting string as date, Spark throws error or returns null (according to ANSI config) for 123, but works for 2020. While in Velox, 123 and 2020 both work. We can follow-up in a separate PR to fix Spark cast.
scala> spark.sql("select cast('123' as date)").show(false)
+-----------------+
|CAST(123 AS DATE)|
+-----------------+
|null |
+-----------------+
scala> spark.sql("select cast('2020' as date)").show(false)
+------------------+
|CAST(2020 AS DATE)|
+------------------+
|2020-01-01 |
+------------------+
System information
CMake Version: 3.16.3
System: Linux-5.4.0-173-generic
Arch: x86_64
C++ Compiler: /usr/bin/c++
C++ Compiler Version: 11.1.0
C Compiler: /usr/bin/cc
C Compiler Version: 11.1.0
CMake Prefix Path: /usr/local;/usr;/;/usr;/usr/local;/usr/X11R6;/usr/pkg;/opt
Relevant logs
No response
The text was updated successfully, but these errors were encountered:
Bug description
When casting string as date, Spark throws error or returns null (according to ANSI config) for 123, but works for 2020. While in Velox, 123 and 2020 both work. We can follow-up in a separate PR to fix Spark cast.
System information
CMake Version: 3.16.3
System: Linux-5.4.0-173-generic
Arch: x86_64
C++ Compiler: /usr/bin/c++
C++ Compiler Version: 11.1.0
C Compiler: /usr/bin/cc
C Compiler Version: 11.1.0
CMake Prefix Path: /usr/local;/usr;/;/usr;/usr/local;/usr/X11R6;/usr/pkg;/opt
Relevant logs
No response
The text was updated successfully, but these errors were encountered: