You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/17 12:13:00 UTC

[jira] [Commented] (FLINK-8838) Add Support for UNNEST a MultiSet type field

    [ https://issues.apache.org/jira/browse/FLINK-8838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16478968#comment-16478968 ] 

ASF GitHub Bot commented on FLINK-8838:
---------------------------------------

Github user twalthr commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5619#discussion_r188931486
  
    --- Diff: flink-libraries/flink-table/src/test/scala/org/apache/flink/table/runtime/batch/sql/AggregateITCase.scala ---
    @@ -367,6 +367,36 @@ class AggregateITCase(
         TestBaseUtils.compareResultAsText(result.asJava, expected)
       }
     
    +  @Test
    +  def testUnnestMultisetFromTumbleWindowAggregateCollectResult(): Unit = {
    +    val env = ExecutionEnvironment.getExecutionEnvironment
    +    val tEnv = TableEnvironment.getTableEnvironment(env, config)
    +
    +    val sqlQuery =
    +      "SELECT b, COLLECT(b) as `set`" +
    +        "FROM T " +
    +        "GROUP BY b, TUMBLE(ts, INTERVAL '3' SECOND)"
    +
    +    val ds = CollectionDataSets.get3TupleDataSet(env)
    +      // create timestamps
    +      .map(x => (x._1, x._2, x._3, toTimestamp(x._1 * 1000)))
    +    tEnv.registerDataSet("T", ds, 'a, 'b, 'c, 'ts)
    +
    +    val view1 = tEnv.sqlQuery(sqlQuery)
    +    tEnv.registerTable("v1", view1)
    +
    +    val sqlQuery1 = "SELECT b, s FROM v1 t1, unnest(t1.`set`) AS A(s) where b < 3"
    --- End diff --
    
    Remove the renaming of `v1` to `t1`.


> Add Support for UNNEST a MultiSet type field
> --------------------------------------------
>
>                 Key: FLINK-8838
>                 URL: https://issues.apache.org/jira/browse/FLINK-8838
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API &amp; SQL
>            Reporter: lincoln.lee
>            Assignee: lincoln.lee
>            Priority: Major
>
> MultiSetTypeInfo was introduced by  FLINK-7491, and UNNEST support Array type only,  so it would be nice to support UNNEST a MultiSet type field.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)