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

relational query without result #3605

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

relational query without result #3605

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

Comments

@monetdb-team
Copy link

Date: 2014-10-23 16:00:46 +0200
From: @skinkie
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2015-01-29 14:07:35 +0100

Comment 20299

Date: 2014-10-23 16:00:46 +0200
From: @skinkie

It seems that on longer queries (my hunch is 1024 characters) the error reporting falls back to: "relational query without result".

A deliberate error:
select operatingday, coalesce(gepubliceerd, 0) as gepubliceerd, coalesce(gereden, 0) as gereden, coalesce(geannuleerd, 0) as geannuleerd, coalesce(onbekend, 0) as onbekend, coalesce(extra, 0) as extra, coalesce(tochgezien, 0) as tochgezien from
(select operatingday, count(trip_hash) as gepubliceerd from tt where pointorder = 1 group by operatingday) as a full outer join
(select z.operatingday, count(*) as geannuleerd from (select trip_hash, operatingday from kv17_canceled except select trip_hash, operatingday from kv6 where kv6.messagetype = 'ARRIVAL') as u group by u.operatingday) as e using (operatingday) full outer join
(select o.operatingday, count(trip_hash) as onbekend from (select distinct trip_hash, operatingday from tt) as o join (select distinct trip_hash from tt where (epoch(cast(tt.operatingday as timestamp with time zone)) + cast(split_part(tt.targetarrivaltime, ':', 1) as int) * 3600 + (cast(split_part(tt.targetarrivaltime, ':', 2) as int) + 10) * 60) < epoch(now()) except (select trip_hash from kv6 where messagetype = 'ARRIVAL' union all select trip_hash from kv17_canceled)) as p using (trip_hash) group by operatingday) as f using (operatingday)
order by operatingday;

ERROR = !relational query without result

Removing another line gives:

ERROR = !syntax error, unexpected ORDER in: "select operatingday, coalesce(gepubliceerd, 0) as gepubliceerd, coalesce(gereden"

Comment 20319

Date: 2014-10-28 12:56:57 +0100
From: @njnes

we need the ddl statements to look into this problem

Comment 20320

Date: 2014-10-28 13:31:22 +0100
From: @skinkie

CREATE TABLE "sys"."tt_20141016" (
"operatingday" DATE,
"trip_id" VARCHAR(16),
"pointorder" SMALLINT,
"passagesequencenumber" SMALLINT,
"userstopcode" VARCHAR(10),
"targetarrivaltime" VARCHAR(8),
"targetdeparturetime" VARCHAR(8),
"trip_hash" BIGINT
);

create view tt as select * from tt_20141016;

CREATE TABLE "sys"."kv17_canceled" (
"server" TIMESTAMP,
"messagetype" VARCHAR(17),
"dataownercode" VARCHAR(10),
"operatingday" DATE,
"lineplanningnumber" VARCHAR(10),
"journeynumber" DECIMAL(6),
"reinforcementnumber" DECIMAL(2),
"reasontype" DECIMAL(3),
"subreasontype" VARCHAR(10),
"reasoncontent" VARCHAR(255),
"subreasoncontent" VARCHAR(255),
"userstopcode" VARCHAR(10),
"passagesequencenumber" DECIMAL(4),
"lagtime" DECIMAL(4),
"targetarrivaltime" TIME,
"targetdeparturetime" TIME,
"journeystoptype" VARCHAR(12),
"destinationcode" VARCHAR(10),
"destinationname50" VARCHAR(50),
"destinationname16" VARCHAR(16),
"destinationdetail16" VARCHAR(16),
"destinationdisplay16" VARCHAR(16),
"trip_hash" BIGINT,
"message" TIMESTAMP
);

create view kv6 as select * from kv6_20141016;

I think this is everything you would need.

Comment 20498

Date: 2014-12-01 10:01:20 +0100
From: MonetDB Mercurial Repository <>

Changeset ef3d09ed0e0e made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=ef3d09ed0e0e

Changeset description:

added test for bug #3605

Comment 20500

Date: 2014-12-01 10:02:03 +0100
From: @njnes

seems fixed by recent changes

Comment 20602

Date: 2015-01-29 14:07:35 +0100
From: @sjoerdmullender

Oct2014-SP2 has been released.

@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