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


##########
sql/api/src/main/scala/org/apache/spark/sql/errors/DataTypeErrors.scala:
##########
@@ -275,4 +275,18 @@ private[sql] object DataTypeErrors extends 
DataTypeErrorsBase {
       messageParameters = Map("precision" -> precision.toString),
       cause = null)
   }
+
+  def unsupportedTimestampNtzPrecisionError(precision: String): Throwable = {

Review Comment:
   To pass any garbage from an user while parsing the type in json. The regex 
captures p as text. For values like "9" * 20, p.toInt throws 
NumberFormatException. I catch that and raise UNSUPPORTED_TIMESTAMP_*_PRECISION 
with the original digit string in the error (see DataTypeSuite — I do not want 
a bare NumberFormatException or a misleading message). 



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