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

csvstorage: columns are ordered by name when using columns/index=name #2476

Open
markus2330 opened this Issue Mar 10, 2019 · 6 comments

Comments

Projects
None yet
3 participants
@markus2330
Copy link
Contributor

markus2330 commented Mar 10, 2019

Steps to Reproduce the Problem

sudo kdb mount `pwd`/test.csv system/tests/csv csvstorage header=colname,columns/index=name
echo "b,a" > `kdb file system/tests/csv`
echo "valb,vala" >> `kdb file system/tests/csv`
kdb shell << HERE
kdbGet system/tests/csv
keySetName system/tests/csv/#2
ksAppendKey
keySetName system/tests/csv/#2/a
keySetString vala
ksAppendKey
keySetName system/tests/csv/#2/b
keySetString valb
ksAppendKey
kdbSet system/tests/csv
HERE

Expected Result

That I get the file:

b,a
valb,vala
valb,vala

Actual Result

a,b
vala,valb
vala,valb

System Information

  • Elektra Version: master

Implementation hint

csvstorage needs to remember where the columns were via metadata "order".

@markus2330 markus2330 added the bug label Mar 10, 2019

@goJoWe16

This comment has been minimized.

Copy link

goJoWe16 commented Mar 20, 2019

I would like to solve this bug as homework in the course CM, @markus2330 can you please assign me to this issue?

@markus2330

This comment has been minimized.

Copy link
Contributor Author

markus2330 commented Mar 20, 2019

Are you in contact with @vbalan92, who already chose an issue regarding the csvstorage (#2508)?

@goJoWe16

This comment has been minimized.

Copy link

goJoWe16 commented Mar 20, 2019

No, not until now. Is this a problem? I can also do another issue if that is preferred.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

markus2330 commented Mar 20, 2019

It might be a problem as refactoring in the plugin makes sense and this would not work without any coordination.

Let us see what @vbalan92 says but you can also search for other issues in the meantime.

@vbalan92

This comment has been minimized.

Copy link

vbalan92 commented Mar 20, 2019

Hi guys. As I am responsible for (#2508), I think I can also fix this issue.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

markus2330 commented Mar 20, 2019

Ok, thank you! It makes a lot of sense that you fix all csvstorage related issues. Then you could make the whole homework around csvstorage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.