Conversation
if err != nil { | ||
return errors.Wrap(err, "getting field") | ||
} | ||
|
||
// Translate row keys. | ||
if field.keys() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should validate in this case that the user hasn't passed row IDs, and similarly in the next block that the user hasn't passed any column IDs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I added validation in 7a5b7c3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good other than my one comment. I made a PR with some tests into your branch which I think would be good to get in before merging.
86a1639
to
7a5b7c3
Compare
7a5b7c3
to
ed1af55
Compare
@jaffee Sorry, I missed some the XOR logic within |
@benbjohnson I forgot I wrote some tests when I was reviewing this - could you include them? benbjohnson@df91f81 |
ed1af55
to
490a8cb
Compare
ping @benbjohnson - this ok for merge? |
Overview
This pull request adds support for specifying string keys with
pilosa import
. There was an existing partial implementation but it did not work and required both the index and field to use string keys.Keys are translated server-side so performance will be limited by the translation file speed. Previous tests show the speed to be quite high though.
Usage
Given an index
i
, a fieldf
, and the followingdata.csv
file:The import can be run using the normal import command:
Fixes #1488
Pull request checklist
Code review checklist
This is the checklist that the reviewer will follow while reviewing your pull request. You do not need to do anything with this checklist, but be aware of what the reviewer will be looking for.