Max Gekk created SPARK-57745:
--------------------------------

             Summary: Assign a name to the error class _LEGACY_ERROR_TEMP_3192
                 Key: SPARK-57745
                 URL: https://issues.apache.org/jira/browse/SPARK-57745
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 4.3.0
            Reporter: Max Gekk


h2. What
Assign a proper, descriptive name to the legacy error class 
{{_LEGACY_ERROR_TEMP_3192}} ("Datatype not supported <dt>") as part of the 
migration onto error classes (SPARK-37935).

h2. Where
{{_LEGACY_ERROR_TEMP_3192}} is defined in 
{{common/utils/src/main/resources/error/error-conditions.json}} and thrown from:
* 
{{sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVectorUtils.java}}
 ({{appendValue}})
* 
{{sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/MutableColumnarRow.java}}
 ({{get}} / {{update}} paths)

h2. What to do
* Replace {{_LEGACY_ERROR_TEMP_3192}} with a proper named error condition 
(message parameters + SQLSTATE). The existing {{UNSUPPORTED_DATATYPE}} 
("Unsupported data type <typeName>.", SQLSTATE 0A000) is a natural fit -- reuse 
it rather than introducing a new condition unless a more specific name is 
warranted.
* Update all call sites to throw the new condition (mind the message parameter 
rename {{dt}} -> {{typeName}}).
* Remove {{_LEGACY_ERROR_TEMP_3192}} from {{error-conditions.json}}.
* Add/adjust a test that triggers the error (e.g. in 
{{QueryExecutionErrorsSuite}}), and run the error-class consistency checks 
(e.g. {{SparkThrowableSuite}}).

h2. Relationship
* Parent: SPARK-37935 (Migrate onto error classes).
* Context: surfaced while adding TimeType support to vectorized column 
population (SPARK-57570), where this error guards the unsupported-type path in 
{{ColumnVectorUtils.appendValue}}.



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