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

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

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

    https://github.com/apache/flink/pull/5015#discussion_r151409600
  
    --- Diff: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/SqlExpressionTest.scala
 ---
    @@ -156,6 +156,8 @@ class SqlExpressionTest extends ExpressionTestBase {
         // testSqlApi("('hello world', 12)", "hello world") // test base only 
returns field 0
         testSqlApi("ARRAY[TRUE, FALSE][2]", "false")
         testSqlApi("ARRAY[TRUE, TRUE]", "[true, true]")
    +    testSqlApi("MAP['k1', 'v1', 'k2', 'v2']['k2']", "v2")
    --- End diff --
    
    Please also update the documentation for both Table API and SQL. They need 
to be kept consistent.


> Support MAP value constructor
> -----------------------------
>
>                 Key: FLINK-8038
>                 URL: https://issues.apache.org/jira/browse/FLINK-8038
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table API & SQL
>            Reporter: Rong Rong
>            Assignee: Rong Rong
>
> Similar to https://issues.apache.org/jira/browse/FLINK-4554
> We want to support Map value constructor which is supported by Calcite:
> https://calcite.apache.org/docs/reference.html#value-constructors
> {code:sql}
> SELECT
>   MAP['key1', f0, 'key2', f1] AS stringKeyedMap,
>   MAP['key', 'value'] AS literalMap,
>   MAP[f0, f1] AS fieldMap
> FROM
>   table
> {code}
> This should enable users to construct MapTypeInfo, one of the CompositeType.



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

Reply via email to