[
https://issues.apache.org/jira/browse/IMPALA-11778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Becker resolved IMPALA-11778.
------------------------------------
Resolution: Implemented
> Printing maps may produce invalid json
> --------------------------------------
>
> Key: IMPALA-11778
> URL: https://issues.apache.org/jira/browse/IMPALA-11778
> Project: IMPALA
> Issue Type: Improvement
> Components: Backend
> Reporter: Daniel Becker
> Assignee: Daniel Becker
> Priority: Major
>
> Impala allows non-string types, for example numbers, to be keys in maps. We
> print maps as json objects, but json objects only allow string keys. If the
> Impala map has for example an INT key, the printed json is invalid.
> For example, in Impala the following two maps are not the same:
> {code:java}
> {1: "a", 2: "b"}{code}
> {code:java}
> {"1": "a", "2": "b"}{code}
> The first map has INT keys, the second has STRING keys. Only the second one
> is valid json.
> Hive has the same issue.
> Converting all keys to strings is not good because that causes loss of
> information. On the other hand sometimes we may need valid json, so we could
> introduce a query option that, when set to true, would convert non-string
> keys to strings.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]