You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Ted Chester Jenks (Jira)" <ji...@apache.org> on 2024/03/05 17:27:00 UTC
[jira] [Created] (SPARK-47288) DataType __repr__ change breaks datatype checking (anit-)pattern
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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org