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

Columnize by key/value columns creates empty lines #796

Closed
hvmarck opened this issue Aug 30, 2013 · 8 comments
Closed

Columnize by key/value columns creates empty lines #796

hvmarck opened this issue Aug 30, 2013 · 8 comments
Assignees
Labels
Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Milestone

Comments

@hvmarck
Copy link

hvmarck commented Aug 30, 2013

When using the following data set (in CSV format with ; separator):

ID;Cat;Val
1;a;1
1;b;3
2;b;4
2;c;5
3;a;2
3;b;5
3;d;3

and using the 'Columnize by key/value columns' with OpenRefine 2.6 beta 1 it creates extra blank lines (in CSV format again):

ID;a;b;c;d
;;;;
1;1;3;;
2;;4;5;
;;;;
3;2;5;;3

while it should have been (as done with version 2.5):

ID;a;b;c;d
1;1;3;;
2;;4;5;
3;2;5;;3

@tfmorris
Copy link
Member

This regression was apparently introduced by ca2e959 when fixing issue #529

@ghost ghost assigned tfmorris Sep 11, 2013
tfmorris added a commit to tfmorris/OpenRefine that referenced this issue Sep 19, 2013
ultraklon added a commit to ultraklon/OpenRefine that referenced this issue Feb 2, 2014
tfmorris added a commit to tfmorris/OpenRefine that referenced this issue Jul 3, 2014
@magdmartin
Copy link
Member

@jackyq2015 can you check #849 and comment if it fix the issue.

@thadguidry
Copy link
Member

Jacky

Can you add those comments directly to #796 issue ? Thanks.

BTW, Markdown is supported on comments in Github if you want to prettify
that alignment - https://guides.github.com/features/mastering-markdown/

Thad
+ThadGuidry https://www.google.com/+ThadGuidry

On Tue, Sep 22, 2015 at 6:10 PM, QI notifications@github.com wrote:

This is the result I got after applied the patch made by @ultraklon
https://github.com/ultraklon
Id a b c d
1

2 1 1 3
3 2 4 5
4
5 3 2 5 3

But when I export the csv, It's fine(only 3 lines). Maybe it's because the
empty line were removed when exporting.

So It's not a completely fix me.


Reply to this email directly or view it on GitHub
#796 (comment)
.

@jackyq2015
Copy link
Contributor

Tested again @ultraklon PR, It works. But as he pointed out, seems there's some discrepancy between the test result from the UI and from the Unit testing.

Will be looking into it.

@jackyq2015
Copy link
Contributor

@ultraklon, for the PR #849 you created. To answer your concern for few null cell values, it's a side effect of the reuse row which aimed to address the performance. The post-operation column model is actually not consistent with the data itself because of the reuse. Ie, the cell[1], cell[2] as the old cell values should have been removed completely. Some cleanup has to be done for this operation on the column model and row model. Also releasing the null reference can free up some memory especially for big data set.

Also for the UT, the expected cell number will be differ from row to row since not all the 5 cells are fully populated. so the expectation should also get changed.

Will be working on the 2 changes mentioned above and hopefully can submit the PR this week.

@jackyq2015
Copy link
Contributor

PR created. It was based on the change @ultraklon made.

magdmartin added a commit that referenced this issue Oct 8, 2015
fixed issue #796 Columnize by key/value columns creates empty lines
@thadguidry thadguidry reopened this Dec 29, 2015
@thadguidry
Copy link
Member

@jackyq2015 still not fixed completely. See #1098

@jackyq2015
Copy link
Contributor

dup of #1138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues related to software defects or unexpected behavior, which require resolution.
Projects
None yet
Development

No branches or pull requests

5 participants