Skip to content
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

Remove deprecations&cleanup #441

Merged
merged 4 commits into from
Apr 14, 2022
Merged

Remove deprecations&cleanup #441

merged 4 commits into from
Apr 14, 2022

Conversation

rtroilo
Copy link
Member

@rtroilo rtroilo commented Apr 13, 2022

remove deprecated methods, class and some minor cleanups

removed deprecation

  • OSHEntity.getRawTagKeys

- MapReducerSettings (replaced by filter)

  • osmTag(String key),osmTag(OSMTagInterface tag)
  • osmTag(String key, String value),
  • osmTag(String key, Collection values)
  • osmTag(Collection<? extends OSMTagInterface> keyValuePairs)
  • osmEntityFilter(OSMEntityFilter f) (filter(Filter.byOSMEntity(...)))

Removing deprecate MapReducerSettings methods is unfortunately not straight forward, for example in
TestMapReducer.testOSMEntitySnapshotViewStream we got following query.

OSMEntitySnapshotView.on(oshdb)
  .osmType(type)
  .osmTag("highway") replace to -> filter("highway=*")
  .areaOfInterest(bbox)
  .timestamps(timestamps)
  .osmEntityFilter(entity -> entity.getId() == id)
  .groupByEntity()

will throw an

new UnsupportedOperationException(
          "groupByEntity() must be called before any `map` or `flatMap` "
              + "transformation functions have been set");

the reason for that is that filter(...) instead of osmTag(...) adds a mapping step at

which then conflicts with groupByEntity later on.

Checklist

Please check all finished tasks. If some tasks do not apply to your PR, please cross their text out (by using ~...~) and remove their checkboxes.

@rtroilo rtroilo requested a review from joker234 April 13, 2022 13:36
@rtroilo rtroilo changed the title WIP: Remove deprecations cleanup Remove deprecations&cleanup Apr 13, 2022
@rtroilo rtroilo force-pushed the remove-deprecations-cleanup branch 3 times, most recently from bc1ac10 to a8d31bf Compare April 14, 2022 08:31
joker234
joker234 previously approved these changes Apr 14, 2022
Copy link
Member

@joker234 joker234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog missing

CHANGELOG.md Outdated Show resolved Hide resolved
joker234
joker234 previously approved these changes Apr 14, 2022
@joker234 joker234 merged commit 05111c3 into master Apr 14, 2022
@joker234 joker234 deleted the remove-deprecations-cleanup branch April 14, 2022 17:31
@joker234 joker234 added this to In progress in oshdb refactoring via automation Apr 27, 2022
@joker234 joker234 added this to the release 1.0 milestone Apr 27, 2022
@joker234 joker234 moved this from In progress to Done in oshdb refactoring Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants