Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3246#discussion_r22343378
--- Diff:
external/twitter/src/main/scala/org/apache/spark/streaming/twitter/TwitterInputDStream.scala
---
@@ -88,6 +90,11 @@ class TwitterReceiver(
val query = new FilterQuery
if (filters.size > 0) {
query.track(filters.toArray)
+ }
+ if (locations.size > 0) {
+ query.locations(locations.map(_.toArray).toArray)
+ }
+ if (filters.size > 0 || locations.size > 0) {
--- End diff --
It seems like this could be rewritten to avoid the redundant checks and
create of `FilterQuery` when there is no filtering.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]