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

CSV Storage: Plugin Should Add Array Metadata #3369

Open
sanssecours opened this issue Mar 17, 2020 · 2 comments
Open

CSV Storage: Plugin Should Add Array Metadata #3369

sanssecours opened this issue Mar 17, 2020 · 2 comments

Comments

@sanssecours
Copy link
Member

@sanssecours sanssecours commented Mar 17, 2020

Problem Description

Currently the csvstorage plugin does not add the array meta key to array parents. As a consequence of this behavior other plugins, such as Directory Value, will not work as expected.

Steps to Reproduce the Problem

kdb mount config.csv user/tests/csvstorage csvstorage
printf 'one,two,three\nfour,five,six\n' > `kdb file user/tests/csvstorage`
kdb ls user/tests/csvstorage
#> user/tests/csvstorage/#0
#> user/tests/csvstorage/#0/#0
#> user/tests/csvstorage/#0/#1
#> user/tests/csvstorage/#0/#2
#> user/tests/csvstorage/#1
#> user/tests/csvstorage/#1/#0
#> user/tests/csvstorage/#1/#1
#> user/tests/csvstorage/#1/#2

# The plugin should add the array meta key to array parents, but does not.
kdb meta-get user/tests/csvstorage/#0 array
# RET: 2

Expected Result

The command meta-get should print the value #2 (the index of the last array element) and finish successfully (return code 0).

Actual Result

The command meta-get prints nothing and returns the unsuccessfully (return code 2).

@markus2330

This comment has been minimized.

Copy link
Contributor

@markus2330 markus2330 commented Mar 17, 2020

Thank you very much for creating this issue! Is this a good first issue?

@sanssecours

This comment has been minimized.

Copy link
Member Author

@sanssecours sanssecours commented Mar 17, 2020

Is this a good first issue?

I am not sure. Ideally you only have to add one keySetMeta statement to the code. However, you have to find the ideal position for that statement first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.