-
Notifications
You must be signed in to change notification settings - Fork 324
feat: add 40 native geospatial SQL functions (ST_ expressions) #4423
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
Closed
Closed
Changes from 67 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
40eef83
feat: add native geo UDFs (ST_Contains, ST_Intersects, ST_Distance, S…
sp-202 5231950
fix: resolve scalastyle violations in geo serde
sp-202 90533b8
fix: apply spotless formatting to geo.scala
sp-202 cb274bc
feat: register geo UDFs with Spark SQL via CometSparkSessionExtensions
sp-202 d1601b9
fix: register geo UDFs eagerly at session-build time via injectColumnar
sp-202 771cc67
fix: register geo UDFs via injectOptimizerRule for guaranteed session…
sp-202 ccae211
refactor: replace ScalaUDF geo registration with native Expression cl…
sp-202 de7e566
fix: correct FunctionDescription type and ExpressionInfo constructor …
sp-202 ead062f
fix: resolve scalastyle violations in geo expressions
sp-202 7cc7cc3
fix: spotless -- collapse desc() tuple to single line
sp-202 05c8440
fix: use DE-9IM Relate for geo predicates; fix st_distance for disjoi…
sp-202 01f4be7
feat: add 12 new native geo UDFs (st_length, st_isempty, st_geometryt…
sp-202 a7a1477
fix: add missing trait imports and match on Geometry variants for st_…
sp-202 939856a
fix: remove duplicate CometGeoFallback from comet package
sp-202 67b7d37
fix: handle scalar literal for numeric arg in st_simplify and st_buffer
sp-202 9f3d812
fix: use WKTWriter with explicit precision in st_buffer to avoid POLY…
sp-202 a9654ed
fix: rewrite st_buffer using geo crate trig to avoid GEOS static buil…
sp-202 2da9692
fix: format st_buffer polygon coordinates with full float precision
sp-202 227cfab
debug: add eprintln traces to diagnose st_buffer coordinate values
sp-202 5d5aa98
debug: trace distance argument type and value in st_buffer
sp-202 5b27343
fix: handle Decimal128 scalar arg in st_buffer and st_simplify
sp-202 d3f4313
feat: add 22 new native geo UDFs (constructors, predicates, measureme…
sp-202 6c6328f
fix: use correct method name is_coveredby() in st_covered_by
sp-202 02aac0a
fix: correct is_coveredby() method name and StMakeEnvelope doGenCode …
sp-202 a21ce66
fix: resolve scalastyle errors in GeoExpressions and geo.scala
sp-202 ed687e3
fix: remove supportCodegen override not present on Expression base class
sp-202 11ea0f2
fix: split inline multi-param defineCodeGen lambdas to pass scalastyle
sp-202 40497e5
fix: rename StPoint lambda params x/y to g1/g2 to fix scalastyle pars…
sp-202 27f38fd
fix: split semicolon-separated statements in StMakeEnvelope.eval
sp-202 ae0fc06
fix: move StMakeEnvelope to its own file to fix scalariform parse error
sp-202 1855462
fix: split withNewChildrenInternal params onto separate lines
sp-202 140dd77
fix: split BinaryExpression extends onto separate lines to match orig…
sp-202 9ca8d5b
fix: put g=> on its own line when body is multi-line string concat
sp-202 6bae75a
fix: replace string interpolation in StPoint.nullSafeEval to fix scal…
sp-202 b910d0d
fix: rename (g,t)/(g,d) lambda params to (g1,g2) to fix scalariform p…
sp-202 52a2e75
fix: restore original exact formatting of GeoExpressions.scala to pas…
sp-202 bdce78a
fix: restore InternalRow import to preserve scalariform parser state
sp-202 898cf67
fix: restore StMakeEnvelope to GeoExpressions.scala to fix scalarifor…
sp-202 a19b80d
fix: remove ${} interpolation from StPoint.nullSafeEval (re-introduce…
sp-202 2508b29
fix: rename all single-letter tuple lambda params to (g1,g2) for scal…
sp-202 9ca174b
fix: restore original param names in StSimplify/StBuffer/StPoint for …
sp-202 3d07536
fix: restore StPoint.doGenCode to original 1-line defineCodeGen format
sp-202 ad23af4
fix: collapse StPoint.doGenCode lambda to single line for scalariform
sp-202 4ab5a20
fix: rename StPoint.doGenCode lambda params x,y to g1,g2 for scalariform
sp-202 16c4166
fix: rename StPoint nullSafeEval params and restore multi-line doGenC…
sp-202 503c39a
fix: reformat StConvexHull/StSimplify/StBuffer defineCodeGen to stand…
sp-202 b72de70
fix: reformat all broken defineCodeGen 4-arg-per-line calls to standa…
sp-202 5058b36
fix: rewrite entire GeoExpressions.scala using proven 4-line defineCo…
sp-202 d8137f5
fix: move StPoint into binary expressions block to fix scalariform pa…
sp-202 b0003a9
fix: wrap args parameter in parens in all desc() lambda registrations…
sp-202 136ec97
(g) => fix inside the doGenCode
sp-202 a13dd2b
(g) => fix inside the doGenCode
sp-202 7169399
(g) => fix inside the doGenCode
sp-202 32c3c93
fix: wrap args => lambdas in blocks { args => } in desc() registratio…
sp-202 54be1b7
fix: use CometGeoFallback.makePoint in StPoint to avoid escaped quote…
sp-202 722d0ea
fix: wrap long desc() lines and add trailing newline to fix scalastyle
sp-202 b171e72
fix: remove supportCodegen and doGenCode from StMakeEnvelope (plain E…
sp-202 a20bb01
fix: restore doGenCode to StMakeEnvelope (abstract in Expression base…
sp-202 a1ec9e5
fix: put StMakeEnvelope.doGenCode signature on one line to match style
sp-202 b7e8477
fix: add braces to if/else in StMakeEnvelope and apply spotless forma…
sp-202 fa211a2
fix: apply spotless formatting - license header, line wrapping, desc(…
sp-202 c3e3d0f
docs: add geo-functions reference for 40 Comet ST_ functions
sp-202 787de62
ci: add cmake and libgeos-dev to Linux/macOS builder actions for geo …
eb1ddd8
chore: add trailing newline to geo mod.rs
b3c824c
style: apply cargo fmt to all geo expression files
f344f57
fix: add ASF license header to docs/geo-functions.md to pass RAT check
fd173fd
fix: replace infallible try_from with from in st_as_geojson to satisf…
84d4bf1
fix: remove LGPL geos crate; reimplement set ops using pure Rust geo:…
341af1c
Merge pull request #1 from sp-202/ci-test-geo-functions
sp-202 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be adding dependencies on C++ libraries, especially when they are LGPL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andygrove — completely agree, thank you for catching this. I will remove the geos dependency entirely. The LGPL license and C++ dependency are both good reasons to avoid it. I'll reimplement ST_Buffer, ST_Union, ST_Intersection, and ST_Difference using the pure Rust geo