uros-db commented on code in PR #56288:
URL: https://github.com/apache/spark/pull/56288#discussion_r3346970867


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastWithAnsiOffSuite.scala:
##########
@@ -56,6 +56,18 @@ class CastWithAnsiOffSuite extends CastSuiteBase {
     checkEvaluation(cast(123L, DecimalType(2, 0)), null)
   }
 
+  test("SPARK-57211: legacy mode cast malformed string to nanosecond timestamp 
returns null") {
+    Seq("123", "2015-03-18 123142", "2015-03-18X", "abdef").foreach { str =>
+      
org.apache.spark.sql.catalyst.util.TimestampNanosTestUtils.foreachNanosPrecision
 {

Review Comment:
   Nit: CastWithAnsiOffSuite uses the fully-qualified 
org.apache.spark.sql.catalyst.util.TimestampNanosTestUtils.foreachNanosPrecision
 inline, whereas the other two suites import it. Importing it there too would 
be cleaner.
   
   Consider using `import 
org.apache.spark.sql.catalyst.util.TimestampNanosTestUtils.foreachNanosPrecision`
 instead (like for example: CastWithAnsiOnSuite.scala‎).



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