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/07 19:00:04 UTC
[GitHub] [flink] snuyanzin commented on a change in pull request #18287: [FLINK-17321][table] Add support casting of map to map and multiset to multiset
snuyanzin commented on a change in pull request #18287:
URL: https://github.com/apache/flink/pull/18287#discussion_r780465918
##########
File path: flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CastFunctionITCase.java
##########
@@ -1142,14 +1146,27 @@ protected Configuration configuration() {
public static List<TestSpec> constructedTypes() {
return Arrays.asList(
- // https://issues.apache.org/jira/browse/FLINK-17321
- // MULTISET
- // MAP
+ CastTestSpecBuilder.testCastTo(MAP(STRING(), STRING()))
+ .fromCase(MAP(FLOAT(), DOUBLE()), null, null)
+ .fromCase(
+ MAP(INT(), INT()),
+ Collections.singletonMap(1, 2),
+ Collections.singletonMap("1", "2"))
Review comment:
I didn't get, should it fail?
```sql
SELECT CAST(MAP['a', row(1)] AS MAP<STRING, STRING>);
```
I thought it should return something like that
```
{a=(1)}
--
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