remove deprecated old type+tag filters and allow groupById and aggregatebyGeometry after mapping/filtering#451
Conversation
|
I'm not sure why this seemingly breaks the following two tests on Jenkins: These two tests work fine locally here. Will need to investigate 🤔 |
Don't worry about this tests, we fixed them already in #450 |
0150186 to
4704607
Compare
Even though we fixed a lot in #450, the tests were still failing. I suspect that |
| .aggregateByTimestamp() | ||
| .aggregateByGeometry(getSubRegions()) | ||
| .aggregateByTimestamp(OSMEntitySnapshot::getTimestamp) |
There was a problem hiding this comment.
What was the reason to change the order of the aggregation from timestamp, geometry to geometry, timestamp.
There was a problem hiding this comment.
fixed in 40dba31 by simplifying the implementation of the "automatic" aggregation methods. As as sideeffect, now all(?) aggregation combinations are allowed and possible regardless of their order, for example: mapRed.aggregateByGeometry(…).aggregateByTimestamp() or mapRed.map(…).aggregateByTimestamp().aggregateByGeometry(…)
by adding access to the original "root" object of the map-reducer's view to the MapFunction class.
Co-authored-by: Rafael Troilo <rafael.troilo@heigit.org>
Good catch, you're right. It was probably an oversight / remainder of some intermediate change I made that wasn't necessary in the end. I've now restored the specific types in the cast. |
addresses #324:
osmTypefilter methodsosmTagfilter methodsosmTag(key, valueRegexp)) method. reason: it was rarely used and never really worked when using an ignite backend. Also, it can be implemented relatively easily manually if needed in an analysis.groupByIdandaggregateByGeometryalso after a filter, map or flatMap function was specified on a mapReducer. (solving the issue outlined in Removing deprecate MapReducerSettings #442 (comment))the following corner case still causes an
UnsupportedOperationException:mapRed.filter("…").aggregateBy(…).aggregateByGeometry(…)but it can be worked around relatively easily by either swapping the two aggregateBy's (mapRed.filter("…").aggregateByGeometry(…).aggregateBy(…)) or by delaying the filtering (mapRed.aggregateBy(…).aggregateByGeometry(…).filter("…")).Corresponding issue
Closes #324
Checklist
I have made corresponding changes to the documentationI have adjusted the examples or created an issue in the corresponding repository[ ] I have adjusted the benchmark or created an issue in the corresponding repository