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

Decimal parsing fails #6917

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

Decimal parsing fails #6917

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-07-04 07:52:58 +0200
From: @mlkersten
To: SQL devs <>
Version: -- development

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

Comment 27889

Date: 2020-07-04 07:52:58 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:77.0) Gecko/20100101 Firefox/77.0
Build Identifier:

If you take an input file as shown below, where a few lines have an extra space, than the decimal parsing fails. This does not happen when reading from STDIN

sql>select * from sys.rejects();
+-------+-------+-------------------------------------------------+--------+
| rowid | fldid | message | input |
+=======+=======+=================================================+========+
| 8 | 2 | line 8 field d 'decimal(8,3)' expected in '5 ' | 0,5 |
| 9 | 2 | line 9 field d 'decimal(8,3)' expected in '67 ' | 0,67 |
+-------+-------+-------------------------------------------------+--------+

Reproducible: Always

Steps to Reproduce:

create table tmpcopy(i integer, d decimal(8,3));
copy into tmpcopy from '/path/input' delimiters ',','\n' best effort;

select * from sys.rejects();
select * from tmpcopy;
drop table tmpcopy;

and use an input file containing
0,1.2
0,2.34
0,3.456
0,4.456
0,5
0,67
0,890
0,5
0,67
0,890

Expected Results:

Proper parsing of the decimal ignoring the white space after it.

Comment 27924

Date: 2020-07-21 09:25:38 +0200
From: @sjoerdmullender

Test added: https://dev.monetdb.org/hg/MonetDB/rev/7d8a14cb4fc1
Fix added: https://dev.monetdb.org/hg/MonetDB/rev/2b2f95657916

@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