L. C. Hsieh created SPARK-47528:
-----------------------------------
Summary: Add UserDefinedType support to DataTypeUtils.canWrite
Key: SPARK-47528
URL: https://issues.apache.org/jira/browse/SPARK-47528
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 4.0.0
Reporter: L. C. Hsieh
Our customer hits an issue recently when they tries to save a DataFrame
containing some UDTs as table (`saveAsTable`). The error looks like:
```
- Cannot write 'xxx': struct<...> is incompatible with struct<...>
```
The catalog strings between two sides are actually same which makes the
customer confused.
It is because `DataTypeUtils.canWrite` doesn't handle `UserDefinedType`. If the
`UserDefinedType`'s underlying sql type is same as read side, `canWrite` should
return true for two sides.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]