[ https://issues.apache.org/jira/browse/SPARK-24057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Cutler resolved SPARK-24057. ---------------------------------- Resolution: Fixed Fix Version/s: 2.4.0 Issue resolved by pull request 21159 [https://github.com/apache/spark/pull/21159] > put the real data type in the AssertionError message > ---------------------------------------------------- > > Key: SPARK-24057 > URL: https://issues.apache.org/jira/browse/SPARK-24057 > Project: Spark > Issue Type: Improvement > Components: PySpark > Affects Versions: 2.3.0 > Reporter: Huaxin Gao > Assignee: Huaxin Gao > Priority: Minor > Fix For: 2.4.0 > > > I had a wrong data type in one of my tests and got the following message: > /spark/python/pyspark/sql/types.py", line 405, in __init__ > assert isinstance(dataType, DataType), "dataType should be DataType" > AssertionError: dataType should be DataType > I checked types.py, line 405, in __init__, it has > {{assert isinstance(dataType, DataType), "dataType should be DataType"}} > I think it meant to be > {{assert isinstance(dataType, DataType), "%s should be %s" % (dataType, > DataType)}} > so the error message will be something like > {{AssertionError: <type 'long'> should be <class > 'pyspark.sql.types.DataType'>}} > There are a couple of other places that have the same problem. -- 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