Parser interface docs; deprecate setFieldNames/getFieldNames.#35
Merged
drcrallen merged 1 commit intometamx:masterfrom Nov 9, 2015
Merged
Parser interface docs; deprecate setFieldNames/getFieldNames.#35drcrallen merged 1 commit intometamx:masterfrom
drcrallen merged 1 commit intometamx:masterfrom
Conversation
Contributor
gianm
commented
Nov 6, 2015
- Docs for Parser
- Deprecated setFieldNames/getFieldNames. They don't appear to be used in meaningful ways anywhere in Druid, and I think are just confusing things by being on the interface.
Merged
Contributor
There was a problem hiding this comment.
actually, thinking more about it, it seems support for fieldNames is useful for csv, tsv and the regex, javascript parsers in #36 unlike the JSONParser and they shouldn't be deprecated.
Contributor
Author
There was a problem hiding this comment.
@himanshug the thought behind deprecating these was:
- external usages of setFieldNames are generally immediately after construction of a specific parser class. So those usages don't really need to use a setter- they could instead use a constructor that offers fieldNames (those constructors already exist but are not always used).
- these methods are actually pretty nonsensical for the JsonPath parser (Add JsonPath parser #34), because its FieldSpecs serve the same purpose, but they do it in a richer way that is specific to JsonPath.
So, I don't think these methods are really useful, nor do they generalize well to all parsers.
Contributor
There was a problem hiding this comment.
ok, sounds reasonable, I agree field names do not make sense for json parsers but only for csv, tsv, regex parsers who can support those via specific constructors.
Contributor
|
👍 @xvrl @nishantmonu51 @drcrallen can one of you pls merge this? |
Contributor
|
👍 |
drcrallen
added a commit
that referenced
this pull request
Nov 9, 2015
Parser interface docs; deprecate setFieldNames/getFieldNames.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.