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

COPY INTO fails on perfectly clean CSV file #3813

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

COPY INTO fails on perfectly clean CSV file #3813

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

Comments

@monetdb-team
Copy link

Date: 2015-09-28 11:15:56 +0200
From: @hannesmuehleisen
To: SQL devs <>
Version: 11.19.3 (Oct2014)
CC: @drstmane

Last updated: 2015-11-03 10:18:30 +0100

Comment 21285

Date: 2015-09-28 11:15:56 +0200
From: @hannesmuehleisen

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
Build Identifier:

See below

Reproducible: Always

Steps to Reproduce:

START TRANSACTION;

CREATE TABLE "Batting" ("playerID" STRING, "yearID" INTEGER, stint INTEGER, "teamID" STRING, "lgID" STRING, "G" INTEGER, "AB" INTEGER, "R" INTEGER, "H" INTEGER, "X2B" INTEGER, "X3B" INTEGER, "HR" INTEGER, "RBI" INTEGER, "SB" INTEGER, "CS" INTEGER, "BB" INTEGER, "SO" INTEGER, "IBB" INTEGER, "HBP" INTEGER, "SH" INTEGER, "SF" INTEGER, "GIDP" INTEGER);
COPY INTO "Batting" FROM '/whatever/batting.csv.gz' USING DELIMITERS ',','\n','"' NULL AS '';
SELECT COUNT(*) FROM "Batting";

ROLLBACK;

Actual Results:

Failed to import table line 50859 field 22 'int' expected in '0,0,0'

Yet, line 50859 looks like this:
"abbotgl01",1973,1,"OAK","AL",5,,,,,,,,,,,,,,,,

So the error message is also wrong.

File imports fine when splitting in any two parts. I'd call this erratic. The issue breaks the clients/R/Tests/dplyr.R test case.

Expected Results:

Rows are imported

Comment 21286

Date: 2015-09-28 11:16:43 +0200
From: @hannesmuehleisen

CSV can be downloaded from http://homepages.cwi.nl/~hannes/batting.csv.gz

Comment 21287

Date: 2015-09-28 11:27:55 +0200
From: MonetDB Mercurial Repository <>

Changeset 012f913760c9 made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Test for Bug #3813

Comment 21292

Date: 2015-09-28 15:37:24 +0200
From: MonetDB Mercurial Repository <>

Changeset f15a56550f53 made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

added "canonical" stable output for tests schemadiff.Bug-3778 & copy_into.Bug-3813;

correct / expected output still needs to be approved / provided !

Comment 21294

Date: 2015-09-28 15:37:31 +0200
From: MonetDB Mercurial Repository <>

Changeset 0b830207930c made by Stefan Manegold Stefan.Manegold@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

BugTracker-2015: activate "dormand(?)" / new tests schemadiff.Bug-3778 & copy_into.Bug-3813

Comment 21295

Date: 2015-09-28 16:24:20 +0200
From: @drstmane

hg bisect
(plus (quite) some manual work due to too much head-merging instead of re-basing)

reveals that this checkin appears to break the CSV load as reported:
http://dev.monetdb.org/hg/MonetDB/rev/33cfedf29e90

i.e., with the previous checkin
http://dev.monetdb.org/hg/MonetDB/rev/1e216af13eec
it still works fine,
but as to the above checkin it fails as reported.

Comment 21296

Date: 2015-09-29 13:23:49 +0200
From: MonetDB Mercurial Repository <>

Changeset 5408eb05e544 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

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

Changeset description:

Fix for bug #3813: also deal with empty last column.

Comment 21297

Date: 2015-09-29 13:31:22 +0200
From: MonetDB Mercurial Repository <>

Changeset 6309126cf8a6 made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

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

Changeset description:

Test for Bug #3813
(grafted from 012f913760c99d88f4698610c7cd6e783e00598c)

Comment 21446

Date: 2015-11-03 10:18:30 +0100
From: @sjoerdmullender

Jul2015 SP1 has been released.

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

No branches or pull requests

2 participants