refactor oshdb core (and more)#369
Conversation
Not sure I can follow here. AFAICS, the "extended" java functions are only ever used in the oshdb-api module, and are only necessary elsewhere (we only need it when running queries on a remote ignite cluster with peer class loading enabled). IMHO we should put as little "stuff" into the "core" module as possible. Keeping it slim allows that some fixes don't need to be deployed on the ignite cluster for example. PS:
If I remember correctly, we had the two classes before |
|
I saw a commit 46ec2eb which introduces an other set of PredicateSerializables again, because of circular dependencies. |
Yes sounds good, so what do you think about to move the SerializedFunctions into the oshdb-util module oshdb.util.function instead of the oshdb-api module. Because there are also used by the oshdb.util.celliterator.CellIterator and oshdb.filter.Filter |
There was a problem hiding this comment.
For this review I only looked at some of the code (i.e. where there are comments below).
In general I like the idea behind the introduction of the new OSHDBTimeable and OSHDBBoundable interfaces, but the naming could be "improved" maybe? IMHO, it could be made clearer the the time aspect is only for points in time, while the spatial aspect is (in general) for bounded regions.
Maybe the point-in-time interface could be just OSHDBEvent (or OSHDBTemporal) which would leave us the door open to later introduce a class for time-intervals similar to OSHDBBoundable) without confusion?!
PS: I found that there were a lot of lines introduced in this PR which contain trailing spaces or empty lines consisting of only spaces. IMHO this should be avoided. Is it not possible to configure your code editor to automatically remove trailing whitespace on save? 😜
14eab3b to
1c59dfc
Compare
… refactor-oshdb-core
|
PS: I've crated branches to update the examples and benchmarks repositories: |
It would be nice to check these off, at least for the newly created interfaces. 🙏 |
8628e38 to
f8d91cc
Compare
|
I removed the getTimestamp for the OSHDBTemporal interface as well. |
I added the javadoc but I'm not sure about the uni-tests for the interfaces. I think the should be covered by the implementing classes. Do you think that is enough, or should I write some test again. |
|
Thank you and good review! |
Refactoring oshdb core. This PR touches a lot of files because of moving of classes to different packages.
renaming methods
this makes is more unified with the OSMRelation interface
deprecations of methods
removed methods
this makes OSHDBBoundingBox immutable!
reorganisation
makes a common/central place for our extended java function api.
new interfaces
main interface for OSHDBTimestamp, allows to "flatten" OSMEntity and reduce object creation.
add methods isAfter/isBefore to OSMEntity so that we directly can check like
osmEntity.isAfter(timestamp)main interface for OSHDBBoundingBox allows to "flatten" OSHEntity and reduce object creation.
add methods intersects/isInside to OSHEntity so that we direcly can check like
oshEntity.intersects(bbox)notes
Checklist
I have made corresponding changes to the documentation