MaxGekk commented on code in PR #56041:
URL: https://github.com/apache/spark/pull/56041#discussion_r3283094579


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/DataTypeParserSuite.scala:
##########
@@ -241,4 +289,53 @@ class DataTypeParserSuite extends SparkFunSuite with 
SQLHelper {
       condition = "PARSE_SYNTAX_ERROR",
       parameters = Map("error" -> "'WITH'", "hint" -> ""))
   }
+
+  test("invalid precision of the nanos timestamp data type") {

Review Comment:
   This test covers the two zone-suffixed forms - TIMESTAMP(6) WITHOUT TIME 
ZONE -> TIMESTAMP_NTZ error and TIMESTAMP(10) WITH LOCAL TIME ZONE -> 
TIMESTAMP_LTZ error - but does not exercise the bare TIMESTAMP(6) / 
TIMESTAMP(10) form under each SQLConf.TIMESTAMP_TYPE setting, which is the path 
that routes through SqlApiConf.get.timestampType in DataTypeAstBuilder.scala.
   
     Alternatively, the assertions could be added to the existing test("Set 
default timestamp type") block at line 159, since that test already wraps both 
values of SQLConf.TIMESTAMP_TYPE and was modified by this PR to add the 
success-case parse("timestamp(9)") assertions — the invalid-precision 
counterpart would sit naturally next to them.



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