[ https://issues.apache.org/jira/browse/SPARK-23696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401479#comment-16401479 ]
Hyukjin Kwon commented on SPARK-23696: -------------------------------------- Why don't we just directly use {{DataType.fromJson}} if you need to catch the exception? > StructType.fromString swallows exceptions from DataType.fromJson > ---------------------------------------------------------------- > > Key: SPARK-23696 > URL: https://issues.apache.org/jira/browse/SPARK-23696 > Project: Spark > Issue Type: Bug > Components: ML > Affects Versions: 2.2.1 > Reporter: Simeon H.K. Fitch > Priority: Trivial > > `StructType.fromString` swallows exceptions from `DataType.fromJson`, > assuming they are an indication that the `LegacyTypeStringParser.parse` > should be called instead. When that fails (because it throws an excreption), > an error message is generated that does not reflect the true problem at hand, > effectively swallowing the exception from `DataType.fromJson`. This makes > debugging Parquet schema issues more difficult. -- 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