tschwarzinger commented on PR #27383:
URL: https://github.com/apache/datafusion/pull/27383#issuecomment-7132842775
Thanks for the end to end test!
I think the approach of injecting the `CastExtension` during physical
planning makes sense. And the end to end test also shows the casts working.
IIRC, this should be enough to address the UUID casting use case from @adriangb
.
I think keeping the PRs separate is good, while having the end 2 end test
shows that this approach can work.
For others, the end 2 end test which casts from `Bool8` to `VARCHAR` via
SQL. `bool8_values` is an `Int8Array` with the Bool8 extension type.
```rust
let result = ctx
.sql("SELECT CAST(value AS VARCHAR) AS value FROM bool8_values")
.await?
.to_string()
.await?;
assert_snapshot!(
result,
@r"
+-------+
| value |
+-------+
| false |
| true |
| true |
| |
+-------+
"
);
```
--
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]