You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/06 15:01:19 UTC
[GitHub] [flink] snuyanzin commented on pull request #18287: [FLINK-17321][table] Add support casting of map to map and multiset to multiset
snuyanzin commented on pull request #18287:
URL: https://github.com/apache/flink/pull/18287#issuecomment-1006658745
I added test for map and multiset to `CastFunctionITCase` and for map it is ok while for multiset it fails with
```
rg.apache.flink.table.api.ValidationException: Could not cast the value of the 1 column: [ map(1, 1) ] of a row: [ null, map(1, 1) ] to the requested type: MULTISET<INT>
at org.apache.flink.table.operations.utils.ValuesOperationFactory.lambda$null$4(ValuesOperationFactory.java:130)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.apache.flink.table.operations.utils.ValuesOperationFactory.lambda$convertTopLevelExpressionToExpectedRowType$5(ValuesOperationFactory.java:127)
at java.util.stream.IntPipeline$4$1.accept(IntPipeline.java:250)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:110)
```
It seems the reason is not `LogicalTypeCasts` but absent converter for multiset here https://github.com/apache/flink/blob/c5581b8b41e04c1b2fabe3cee57efb1253b4066d/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/ValuesOperationFactory.java#L190
I will have a look at it later today
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org