Ted Chester Jenks created SPARK-47288:
-----------------------------------------

             Summary: 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


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

Reply via email to