[ https://issues.apache.org/jira/browse/SPARK-17694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15529134#comment-15529134 ]
Sean Owen commented on SPARK-17694: ----------------------------------- You're saying that df00 or df01 does not actually contain FooType? Then that's the error of course. It should fail, it's just a question of when. I would actually not necessarily expect it fails fast, but, it seems to already: {code} scala> spark.createDataset(Seq(1,2,3)).as[List[String]] org.apache.spark.sql.AnalysisException: cannot resolve '`value`' due to data type mismatch: cannot cast IntegerType to ArrayType(StringType,true); {code} Is that not what you're looking for? > convert DataFrame to DataSet should check columns match > ------------------------------------------------------- > > Key: SPARK-17694 > URL: https://issues.apache.org/jira/browse/SPARK-17694 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 1.6.1, 1.6.2 > Reporter: Chenliang Xu > Priority: Minor > > The {{as}} method, which converts a DataFrame to DataSet requires the user to > ensure the columns are match. And it success even the columns do not match, > and cause error at later steps. > It would be better, to let {{as}} match the columns, and fail/warn when the > match fails. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org