[ 
https://issues.apache.org/jira/browse/FLINK-7596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timo Walther resolved FLINK-7596.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4.0

Fixed in 1.4.0: 62ebda3f99f0d311676e98d6ae1e48c2322a39cb & 
2b82578abec20eb97bc0d641ca19977cc3805c9e
Fixed in 1.3.2: 701be5d53c9a6531089d2bba2b4633513713e5ec & 
314ca04b3a06b960ac324484b099fd66ffcb2fbd

> fix bug when Set Operation handles ANY type
> -------------------------------------------
>
>                 Key: FLINK-7596
>                 URL: https://issues.apache.org/jira/browse/FLINK-7596
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Ruidong Li
>            Assignee: Ruidong Li
>             Fix For: 1.4.0
>
>
> If two inputs with Any(GenericRelDataType), when they comes to Set 
> Operation({{UNION}}, {{MINUS}},...), it will cause a {{TableException}} with 
> info is "Type is not supported: ANY"
> Here is the test case:
> {code}
> @Test
>   def testUnion(): Unit = {
>     val list = List((1, new NODE), (2, new NODE))
>     val list2 = List((3, new NODE), (4, new NODE))
>     val env = StreamExecutionEnvironment.getExecutionEnvironment
>     val tEnv = TableEnvironment.getTableEnvironment(env)
>     val s1 = tEnv.fromDataStream(env.fromCollection(list))
>     val s2 = tEnv.fromDataStream(env.fromCollection(list2))
>     val result = s1.unionAll(s2).toAppendStream[Row]
>     result.addSink(new StreamITCase.StringSink[Row])
>     env.execute()
>   }
>   class NODE {
>   val x = new util.HashMap[String, String]()
> }
> {code}
> This bug happens because Flink doesn't handle {{createSqlType(ANY)}} and 
> Calcite doesn't know the differences between {{ANY}} and 
> {{ANY(GenericRelDataType)}}, so the {{createSqlType(ANY)}} of Calcite will 
> return a {{BasicSqlType}} instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to