Ala Luszczak created SPARK-58999:
------------------------------------

             Summary: Allow using "bare" error class when subclasses exist
                 Key: SPARK-58999
                 URL: https://issues.apache.org/jira/browse/SPARK-58999
             Project: Spark
          Issue Type: Improvement
          Components: Spark Core
    Affects Versions: 4.2.0
            Reporter: Ala Luszczak


Currently whenever an error class has at least one subclass (e.g., 
SPARK_ERROR_CLASS.SUBCLASS), attempting to raise an error using only the main 
class (SPARK_ERROR_CLASS without any subclass) hits an assertion in the error 
infra. If any subclass exists, a subclass has to always be used.

This limitation is very inconvenient. A pattern where additional information, 
if available, is provided via subclass is common. Right now, this necessitates 
also having a "generic" subclass for any situation when the additional 
information is unavailable. It results in odd and redundant error messages. I 
don't see any practical reason why using only the main class would be a 
problem. 

We should lift this limitation. Looking at the code, I am not even sure if it's 
an intentional limitation, or a minor oversight (bug).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to