Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove not implemented aggregate function json.output(js json) #6857

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

remove not implemented aggregate function json.output(js json) #6857

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2020-05-01 21:20:06 +0200
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.35.19 (Nov2019-SP3)
CC: @PedroTadim

Last updated: 2020-10-19 11:06:22 +0200

Comment 27689

Date: 2020-05-01 21:20:06 +0200
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:74.0) Gecko/20100101 Firefox/74.0
Build Identifier:

In sys.functions there is an aggregate function json.output(js json) listed.
When calling json.output(js json) it always returns an Error with msg: "Not yet implemented". So its is not useful.
As it is unclear what this output() aggregate function should do, I think it is better to remove it from the system.

Reproducible: Always

Steps to Reproduce:

select func from sys.functions where name = 'output' and mod = 'json' and system;
-- shows: create aggregate json.output(js json)\nreturns string external name json.output;

create table js6856(c int, jsval json);
insert into js6856 values (1, '["a", 4]'), (1, '["b", 3]'), (1, '["c", 2]'), (1, '["d", 1]');
select * from js6856;
select json.output(jsval) from js6856;
-- Not yet implemented
select c, json.output(jsval) from js6856 group by c;
-- TypeException:user.s14_1[16]:'json.suboutput' undefined in: X_28:bat[:str] := json.suboutput(X_23:bat[:json], X_24:bat[:oid], X_25:bat[:oid], true:bit);

drop table js6856;

Actual Results:

sql>select func from sys.functions where name = 'output' and mod = 'json' and system;
+-----------------------------------------------------------------------------+
| func |
+=============================================================================+
| create aggregate json.output(js json) |
: returns string external name json.output; :
+-----------------------------------------------------------------------------+
1 tuple
sql>create table js6856(c int, jsval json);
operation successful
sql>insert into js6856 values (1, '["a", 4]'), (1, '["b", 3]'), (1, '["c", 2]'), (1, '["d", 1]');
4 affected rows
sql>select * from js6856;
+------+----------+
| c | jsval |
+======+==========+
| 1 | ["a", 4] |
| 1 | ["b", 3] |
| 1 | ["c", 2] |
| 1 | ["d", 1] |
+------+----------+
4 tuples
sql>select json.output(jsval) from js6856;
Not yet implemented
sql>select c, json.output(jsval) from js6856 group by c;
TypeException:user.s14_1[16]:'json.suboutput' undefined in: X_28:bat[:str] := json.suboutput(X_23:bat[:json], X_24:bat[:oid], X_25:bat[:oid], true:bit);
sql>drop table js6856;
operation successful
sql>

Remove definition for aggregate json.output from:
https://dev.monetdb.org/hg/MonetDB/file/Nov2019/sql/scripts/40_json.sql
https://dev.monetdb.org/hg/MonetDB/file/Nov2019/monetdb5/modules/atoms/json.mal

Comment 27855

Date: 2020-06-16 09:52:47 +0200
From: MonetDB Mercurial Repository <>

Changeset 05e39c517279 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=05e39c517279

Changeset description:

Removed obsolete json.output(json) function. This fixes bug #6857
@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants