Jefffrey opened a new issue, #22709:
URL: https://github.com/apache/datafusion/issues/22709
### Is your feature request related to a problem or challenge?
these work:
```sql
> select arrow_cast(struct(10), 'Struct("c0": nullable Int64)');
+--------------------------------------------------------------------+
| arrow_cast(struct(Int64(10)),Utf8("Struct("c0": nullable Int64)")) |
+--------------------------------------------------------------------+
| {c0: 10} |
+--------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.065 seconds.
> select arrow_cast(10, 'List(non-null Int64)');
+----------------------------------------------------+
| arrow_cast(Int64(10),Utf8("List(non-null Int64)")) |
+----------------------------------------------------+
| [10] |
+----------------------------------------------------+
1 row(s) fetched.
Elapsed 0.010 seconds.
```
this doesn't work, when field is specified to be non-nullable inside a
struct:
```sql
> select arrow_cast(struct(10), 'Struct("c0": non-null Int64)');
Optimizer rule 'simplify_expressions' failed
caused by
This feature is not implemented: Unsupported CAST from Struct("c0": Int64)
to Struct("c0": non-null Int64)
```
### Describe the solution you'd like
see if its possible to implement this support? it seems to work for lists
but not structs, so not sure if this is a limitation or theres a valid reason
to not allow this
### Describe alternatives you've considered
_No response_
### Additional context
i think somewhere around here in the codebase?
https://github.com/apache/datafusion/blob/5c92390921d8d667aa7cb7d56276a59ba36926f4/datafusion/physical-expr/src/expressions/cast.rs#L384-L416
--
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]