Execute spatial distance with RowFn - #9349
Conversation
Merging this PR will improve performance by 17.87%
Performance Changes
Tip Curious why this is faster? Comment Comparing Footnotes
|
fadcf1d to
46c63e4
Compare
46c63e4 to
450326d
Compare
450326d to
788ce5f
Compare
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
788ce5f to
bba41db
Compare
|
Here are the local spatial-distance benchmark results from the final Rust 1.97.1 run. The comparison used a The machine was an AMD Ryzen 9 7950X running Linux. The build used rustc 1.97.1, LLVM 22.1.6, one CGU, fat LTO, and Negative changes are faster. The values are medians across the seven paired runs. The three ordinary distance cases remain within 2.65%. The nullable column-by-constant case improves by 13.85%. All spatial-distance results: 4 cases
|
Rationale for this change
Moves spatial distance to the shared row executor. Each geometry column decodes once per batch, and a constant operand remains one decoded geometry.
What changes are included in this PR?
Adds the crate-private
GeometryRowinput element and expresses distance as a two-row kernel. Tests cover both constant positions, nullable inputs, mixed geometry types, and exact distance behavior.Rust 1.97.1 one-CGU fat-LTO measurements keep the ordinary distance cases within 2.7% of
develop; the nullable column-by-constant case improves by 13.9%.What APIs are changed? Are there any user-facing changes?
There are no public API or behavior changes.
SpatialDistanceimplementsRowFnand receives the standard scalar-function vtable automatically.