-
Notifications
You must be signed in to change notification settings - Fork 96
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
Rename filter variables and methods in DataApiRequest #507
Conversation
Note that this is a breaking change (anybody who uses either of the getters in a request mapper will experience compile errors when they upgrade). We generally try to avoid breaking changes, especially in small updates. Instead, we should add new methods with the desired names, and deprecate the old methods. Then we can remove the deprecated methods in a later major version rev, where breaking changes are more or less expected. Also we should add a CHANGELOG. |
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.
Forgot to use the Request Changes
feature, and I can't do a blank request changes
.
return this.apiFilters; | ||
} | ||
|
||
@Deprecated | ||
public Map<Dimension, Set<ApiFilter>> getFilters() { |
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.
These deprecated methods should delegate to the non-deprecated version (i.e. getFilters()
should return getApiFilters()
. Furthermore, we should add a Javadoc, with a @deprecated
annotation indicating which method to use instead.
* | ||
* @deprecated this method has been deprecated because its name is unclear. Please use {@link #getDruidFilter()}. | ||
*/ | ||
@Deprecated | ||
public Filter getFilter() { | ||
try (TimedPhase timer = RequestLog.startTiming("BuildingDruidFilter")) { |
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.
This should just delegate to getDruidFilter
.
@mpardesh Just reviewed this change. Had a few small comments. Once those are addressed, I'll be willing to give my approval. |
There's a problem with the underlying issue. There's a reason that API filters are considered plural while Druid filters are singular. Because API filters are treated as a list (or a list grouped into a map by dimension) while the Druid filters are a tree with a leaf node as the reference variable. |
@michael-mclawhorn As far as I can tell, the api filters method is still called |
@archolewa Yeah, I see that. |
Addresses #497