Bug 6773 - json.filter returns corrupted string when selecting JSON null value
Summary: json.filter returns corrupted string when selecting JSON null value
Status: RESOLVED NEXTRELEASE
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: 11.33.11 (Apr2019-SP1)
Hardware: Other Linux
: Normal normal
Assignee: SQL devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-11 12:01 CEST by jpastuszek@protonmail.com
Modified: 2019-10-11 15:30 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jpastuszek@protonmail.com 2019-10-11 12:01:59 CEST
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Build Identifier: 

This queries return string witch is incorrectly encoded:

select json.filter('{"foo": null}', '$.foo')
select json.filter('[null]', '$[0]')

Reproducible: Always

Steps to Reproduce:
1. Run query that select "null" from JSON object
2. Observe bad string returned
Actual Results:  
[�]

Expected Results:  
Probably "[null]" should be returned.
Comment 1 MonetDB Mercurial Repository cwiconfidential 2019-10-11 12:45:03 CEST
Changeset 7d92d6226c11, made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d92d6226c11

Changeset description:

	Add test for bug 6773
Comment 2 MonetDB Mercurial Repository cwiconfidential 2019-10-11 15:22:28 CEST
Changeset 848f40d8511a, made by Panagiotis Koutsourakis <kutsurak@monetdbsolutions.com> in the MonetDB repo, refers to this bug.

For complete details, see https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=848f40d8511a

Changeset description:

	Do not return str_nil but the sequence `null` for null in JSON

	This fixes the bug 6773.