allisonwang-db commented on a change in pull request #34459:
URL: https://github.com/apache/spark/pull/34459#discussion_r741263371



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryExecutionErrors.scala
##########
@@ -971,6 +971,10 @@ object QueryExecutionErrors {
     new DateTimeException(s"Cannot cast $s to $to.")
   }
 
+  def cannotCastDoubleToTimestampError(d: Double, to: DataType): Throwable = {

Review comment:
       Instead of adding a new error here, how about merge it with the 
`cannotCastUTF8StringToDataTypeError` and maybe call it 
`cannotCastToDataTypeError`? Since they have the same error message and 
exception type.




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