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

SQLancer query copy on unique pair of columns fails and complex query with GDK error #6924

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

Comments

@monetdb-team
Copy link

Date: 2020-07-10 15:01:44 +0200
From: @PedroTadim
To: SQL devs <>
Version: 11.37.7 (Jun2020)

Last updated: 2020-07-27 09:30:12 +0200

Comment 27900

Date: 2020-07-10 15:01:44 +0200
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Build Identifier:

Run the statements bellow.

Reproducible: Always

Steps to Reproduce:

CREATE TABLE "sys"."t0" ("a" INTEGER, "b" INTEGER NOT NULL, CONSTRAINT "t0_a_b_unique" UNIQUE ("a","b"));
--This copy into must succeed
COPY 39 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"';
-88162543 18
-88162543 20
-15649686 -544149211
-88162543 1544983640
NULL -22365094
NULL 1606640302
NULL -2022118335
-706411503 -1573662742
-88162543 117340240
NULL 14
1724946985 -1967779742
NULL -1500350327
NULL -174249097
-88162543 29
-88162543 42
10 0
NULL 1861748843
NULL -1709541615
NULL -143945879
NULL 1
NULL 1158178587
-88162543 14
-846070788 0
-88162543 1242658499
1149990738 -106077877
NULL -70926511
NULL 138623502
NULL -1613851459
NULL -724706022
NULL 1259669628
NULL 0
NULL -297079149
1545824064 16
NULL 0
NULL 1526452554
NULL 1813972190
NULL -30
NULL -1536805627
NULL 1602659226

SELECT ALL COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING MAX(ALL TRUE) UNION ALL SELECT COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING NOT (MAX(ALL TRUE)) UNION ALL SELECT ALL COUNT(ALL DATE '1970-01-02'), ((rtrim(CAST(0.46268474177081 AS STRING), trim(r'W', r'1214312004')))||(lower(CAST(((r'1739914977')||(INTERVAL '456885933' MONTH)) AS STRING)))) FROM t0 WHERE ((t0.b)<=(t0.a)) GROUP BY 0.15600862153602712556477172256563790142536163330078125, TRUE HAVING (MAX(ALL TRUE)) IS NULL;

Actual Results:

CSV import fails
GDK reported error: BATgroupminmax: BATgroupmax: b and g must be aligned

Expected Results:

CSV import to succeed and query to run

@monetdb-team monetdb-team added bug Something isn't working minor 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 minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants