Experimental named field support in tsv-join #288
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow-on to PRs #284, #285, and #286. It adds named field support to
tsv-join
. It works the same way as the support added to tsv-select, see PR #284 for more info.Named field support is backward compatible with numeric fields. As with other tools, this support is not documented yet, even in the help text. Documentation will be added when named field support has been added to all tools and a release performed.
One notable behavior of named field support in
tsv-join
is that the--k|key-fields
option applies to two different files, the "filter file" and the "data files". When a numeric field is specified, it refers the same field number in each file. However, when it's a named field, the columns may have different field numbers in each file. Previously, if the join key was in different columns, the distinction required using both the--k|key-fields
and--d|data-fields
options. Now only the--k|key-fields
option is needed if the join keys has the same field names in both files.This is a step towards enhancement request #25.