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/09 11:17:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17011712#comment-17011712 ]
Jark Wu commented on FLINK-15537:
---------------------------------
Nice catch!
> 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
> Fix For: 1.10.0
>
>
> `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)