[MCOL-844] cpimport tool bug wtih decimal table Created: 2017-07-31 Updated: 2017-11-27 Resolved: 2017-11-27 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | cpimport |
| Affects Version/s: | 1.0.9 |
| Fix Version/s: | Icebox |
| Type: | Bug | Priority: | Major |
| Reporter: | jerry ma | Assignee: | Unassigned |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
centos6.8 |
||
| Attachments: |
|
| Description |
|
I have a column defined as decimal(7,2), when using cpimport I see the following behavior when importing values to this column. ( csv files ) When importing 23.45, the resulting value is 23.45. cpimport is shifting the decimal place if the source file value does not contain 2 decimal places. by the way,when we change column a before column id, the cpimport result is correct! |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-07-31 ] | ||||||||
|
Not able to reproduce (i tested in 1.0.10 but not aware of any related code changes). I used your table definition and this import file: MariaDB [test]> select * from test_dec;
-----
----- Can you check that and provide me a simplified data file that repros plus how you ran cpimport exactly? | ||||||||
| Comment by jerry ma [ 2017-08-01 ] | ||||||||
|
Hi,please try this table and csv files. thanks CREATE TABLE `test` ( | ||||||||
| Comment by David Thompson (Inactive) [ 2017-08-01 ] | ||||||||
|
try removing windows line endings from the file. After i did that (using dos2unix command for example) the numbers seem to load correctly. | ||||||||
| Comment by jerry ma [ 2017-08-03 ] | ||||||||
|
if I change `vzvxilozhu_2` before the varchar column or I delete the varchar column ,it's ok. | ||||||||
| Comment by David Thompson (Inactive) [ 2017-08-09 ] | ||||||||
|
Right because that's going to change how it's parsed. Can you confirm if you tried using unix line endings (\n) on the csv file rather than windows? From what i could see that was the main problem. | ||||||||
| Comment by David Thompson (Inactive) [ 2017-11-27 ] | ||||||||
|
cpimport requires unix line endings for the import files |