[ https://issues.apache.org/jira/browse/SPARK-27429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16821763#comment-16821763 ]
Liang-Chi Hsieh commented on SPARK-27429: ----------------------------------------- Generally I think you can always know which are the values that can't be cast when to_timestamp results to null on them. I don't think a behavior like throwing exception is more making sense here. > [SQL] to_timestamp function with additional argument flag that will allow > exception if value could not be cast > -------------------------------------------------------------------------------------------------------------- > > Key: SPARK-27429 > URL: https://issues.apache.org/jira/browse/SPARK-27429 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 2.4.1 > Reporter: t oo > Priority: Major > > If I am running a SQL on a csv based dataframe and my query has > to_timestamp(input_col,'yyyy-MM-dd HH:mm:ss'), if the values in input_col are > not really timestamp like 'ABC' then I would like to_timestamp function to > throw an exception rather than happily (silently) return the values as null. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org