mikemccand / stargazers-migration-test

Testing Lucene's Jira -> GitHub issues migration
0 stars 0 forks source link

Remove Dead Code From PointRangeQuery [LUCENE-8889] #886

Closed mikemccand closed 5 years ago

mikemccand commented 5 years ago

PointRangeQuery has accessors for the underlying points in the query but those are never accessed. We should remove them


Legacy Jira details

LUCENE-8889 by Atri Sharma (@atris) on Jun 27 2019, resolved Jun 27 2019

mikemccand commented 5 years ago

Why is it an issue ? We have some use cases in Elasticsearch that requires to access these points and I guess that there are other cases outside of Lucene. It's library so we should not expect that all accessors are used directly. We can add a test case if you're concerned by the fact that they are never used internally.

[Legacy Jira: Jim Ferenczi (@jimczi) on Jun 27 2019]

mikemccand commented 5 years ago

@jimczi Call me old school, but I believe that APIs should have atleast one user within library code base (for purely external facing APIs, tests are the way as you suggested).

 

I have raised a PR to beef up equality tests using the said API, let me know if it looks fine

[Legacy Jira: Atri Sharma (@atris) on Jun 27 2019]

mikemccand commented 5 years ago

Commit 7cd20384de947728bb425ddcbd6f87fba419efae in lucene-solr's branch refs/heads/master from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=7cd2038

LUCENE-8889: Add Tests For Accessors Of Ranges in PointRangeQuery (#748)

[Legacy Jira: ASF subversion and git services on Jun 27 2019]

mikemccand commented 5 years ago

Commit 976bc5151469f99a3cc3af198b870ef7b0628a1b in lucene-solr's branch refs/heads/branch_8x from Atri Sharma https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=976bc51

LUCENE-8889: Add Tests For Accessors Of Ranges in PointRangeQuery (#748)

[Legacy Jira: ASF subversion and git services on Jun 27 2019]

mikemccand commented 5 years ago

Oops I had not seen Jim commented here before merging. I'm still resolving, but happy to reopen/revert if there are concerns.

[Legacy Jira: Adrien Grand (@jpountz) on Jun 27 2019]

mikemccand commented 5 years ago

Closing after the 8.2.0 release

[Legacy Jira: Ignacio Vera (@iverase) on Jul 26 2019]