You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/01/19 06:52:00 UTC

[jira] [Resolved] (FLINK-15537) Type of keys should be `BinaryRow` when manipulating map state with `BaseRow` as key type.

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

Jark Wu resolved FLINK-15537.
-----------------------------
    Resolution: Fixed

1.11.0: ac5e288524991d340309d118fa9fa29109e7427f
1.10.0: 791b93d451e371e88ed1d05a91b418fee364f0c5

> Type of keys should be `BinaryRow` when manipulating map state with `BaseRow` as key type.
> ------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15537
>                 URL: https://issues.apache.org/jira/browse/FLINK-15537
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.9.1
>            Reporter: Shuo Cheng
>            Assignee: Shuo Cheng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.10.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> `BaseRow` is serialized and deserialized as `BinaryRow` by default, so when the key type of the map state is `BaseRow`, we should construct map keys with `BinaryRow` as type to get value from map state, otherwise, you would  always get Null...
> Try it with following SQL:
> {code:java}
> // (b: Int, c: String)
> SELECT 
>       b, listagg(DISTINCT c, '#')
> FROM MyTable
> GROUP BY b
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)