snuyanzin commented on code in PR #29101:
URL: https://github.com/apache/flink/pull/29101#discussion_r3941115202
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/logical/utils/LogicalTypeCasts.java:
##########
@@ -687,6 +698,15 @@ private static boolean supportsCasting(
// BITMAP can only be cast to BYTES (unbounded VARBINARY), because
trimming or padding
// would corrupt the serialized bitmap data.
return allowExplicit && getLength(targetType) ==
VarBinaryType.MAX_LENGTH;
+ } else if (sourceRoot == UUID && targetRoot == BINARY) {
Review Comment:
I feel like we miss vise versa case...
as a result
```sql
SELECT CAST(UUID '550e8400-e29b-41d4-a716-446655440000' AS BINARY(10)); --
fails with validation exception
```
and this
```sql
SELECT CAST(CAST(x'01020304050607080910' AS BINARY(10)) AS UUID); -- fail
with runtime exception
```
--
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]