-
Notifications
You must be signed in to change notification settings - Fork 46
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
Internal Rework #494
Merged
Merged
Internal Rework #494
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pretty massive rework of the spatial internals.
Im going to write about this more in the future, but heres the highlights:
Simplify source layout and includes - instead of having a ton of separate file for each function, we now bundle them into files by module/type. We also remove all the extra spatial namespacing and "#include spatial/common.h" helper headers. All in all this significantly reduces compile times and makes it easier to find stuff (not as much nesting). The final layout is not entirely set in stone yet. Im not sure if we want to have a separate include directory or not, we'll see, but this is already much clearer IMO.
Completely reworked internal geometry representation/engine. We now have a separate SGL (spatial geometry library) subproject implementing simple features without any explicit dependencies on the DuckDB code base. Additionally It uses a pretty (I think) clever representation based on circular linked lists and parent-pointers, which allows for very flexible allocation patterns and the implementation of a lot of geometry operations without requiring recursion or allocation. By separating it from the DuckDB code base its also much easier to test, and the goal is to eventually reach full test code coverage on it, which is much more feasible if its not tied to DuckDB. Its currently written in very "low level" C++, because I want to see if we can lower it down into C for extra portability. Its still a bit of a mess though, but ill clean it up eventually.
There are also a lot of misc changes and fixes here and there, heres some at the top of my head