MaxGekk commented on code in PR #56857:
URL: https://github.com/apache/spark/pull/56857#discussion_r3489686453


##########
sql/core/src/main/java/org/apache/spark/sql/execution/vectorized/ColumnVectorUtils.java:
##########
@@ -237,7 +237,7 @@ private static void appendValue(WritableColumnVector dst, 
DataType t, Object o)
         dst.appendLong(DateTimeUtils.localDateTimeToMicros((LocalDateTime) o));
       } else {
         throw new SparkUnsupportedOperationException(
-          "_LEGACY_ERROR_TEMP_3192", Map.of("dt", t.toString()));
+          "UNSUPPORTED_DATATYPE", Map.of("typeName", t.toString()));

Review Comment:
   `typeName` here (and at the two `MutableColumnarRow` sites) is 
`t.toString()`, which renders the type in its unquoted internal form — e.g. 
`Unsupported data type DateType` / `ArrayType(...)` / `ObjectType(...)`.
   
   Every other `UNSUPPORTED_DATATYPE` call site formats `typeName` as the 
double-quoted SQL form via `toSQLType` (`= quoteByDefault(dt.sql)`), e.g. 
`Unsupported data type "DATE"` (see `JsonFunctionsSuite`, `CsvFunctionsSuite`, 
`JDBCWriteSuite`, `ColumnTypeSuite`). Since the goal here is a *stable named* 
condition, please use `toSQLType` to match that contract rather than the raw 
`toString` (which just carried over from `_LEGACY_ERROR_TEMP_3192`).
   
   Please apply `DataTypeErrors.toSQLType(...)` at all three sites, and update 
the new test to assert the `toSQLType` form instead of `objectType.toString`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to