[ https://issues.apache.org/jira/browse/SPARK-47288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17824577#comment-17824577 ]
Hyukjin Kwon commented on SPARK-47288: -------------------------------------- I agree in principle but my concern is more about backward compatibility. > DataType __repr__ change breaks datatype checking (anit-)pattern > ---------------------------------------------------------------- > > Key: SPARK-47288 > URL: https://issues.apache.org/jira/browse/SPARK-47288 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.4.1 > Reporter: Ted Chester Jenks > Priority: Major > > This pr: [https://github.com/apache/spark/pull/34320] > Made reprs for datatype eval-able. This is kind of nice, but we have a ton of > users doing stuff like: > > {code:java} > if str(data_type) == "StringType": > ... > {code} > > Which breaks. > > What would people think of adding a __str__ to the base class that returns > the old behaviour so we can have the best of both worlds. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org