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

gzip'ed files cannot be bulkloaded into DB #3351

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

gzip'ed files cannot be bulkloaded into DB #3351

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

Comments

@monetdb-team
Copy link

Date: 2013-08-27 11:32:17 +0200
From: @hannesmuehleisen
To: SQL devs <>
Version: 11.15.11 (Feb2013-SP3)

Last updated: 2013-09-27 13:47:16 +0200

Comment 19082

Date: 2013-08-27 11:32:17 +0200
From: @hannesmuehleisen

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

COPY INTO does not work on files compressed using GZIP.

The files:

cat foo.csv
1
2
3
4
5

➜ ~ zcat /ufs/hannes/foo.csv.gz
1
2
3
4
5

➜ ~ bzcat foo.csv.bz2
1
2
3
4
5

In mclient:

sql>create table foo(i integer);
operation successful (21.246ms)

sql>copy into foo from '/ufs/hannes/foo.csv';
5 affected rows (121.611ms)

sql>delete from foo;
5 affected rows (8.241ms)

sql>copy into foo from '/ufs/hannes/foo.csv.gz';
0 affected rows (75.695ms) -- <<< THIS IS WRONG

sql>delete from foo;
0 affected rows (14.127ms)

sql>copy into foo from '/ufs/hannes/foo.csv.bz2';
5 affected rows (110.278ms)

Reproducible: Always

Steps to Reproduce:

  1. create csv file and compress using gzip
  2. use COPY INTO to load the csv into the table

Actual Results:

no data is imported (0 affected rows)

Expected Results:

data is imported

Comment 19083

Date: 2013-08-27 11:32:40 +0200
From: @hannesmuehleisen

Created attachment 226
gzipped CSV

Attached file: foo.csv.gz (application/gzip, 38 bytes)
Description: gzipped CSV

Comment 19084

Date: 2013-08-27 11:32:55 +0200
From: @hannesmuehleisen

Created attachment 227
plain CSV

Attached file: foo.csv (text/csv, 10 bytes)
Description: plain CSV

Comment 19085

Date: 2013-08-27 11:33:14 +0200
From: @hannesmuehleisen

Created attachment 228
bzipped CSV

Attached file: foo.csv.bz2 (application/x-bzip, 43 bytes)
Description: bzipped CSV

Comment 19096

Date: 2013-08-28 09:26:52 +0200
From: MonetDB Mercurial Repository <>

Changeset 3fd7041a188d 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=3fd7041a188d

Changeset description:

Added test for bug #3351.

Comment 19097

Date: 2013-08-28 09:38:03 +0200
From: MonetDB Mercurial Repository <>

Changeset c4244249cff1 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=c4244249cff1

Changeset description:

gzerror() does not return NULL in case of no error.
This fixes bug #3351.

Comment 19098

Date: 2013-08-28 09:38:30 +0200
From: @sjoerdmullender

Fixed.

@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