Skip to content

Commit 31f29b5

Browse files
committed
fix vector validity not being reset after fetches in spatial join
1 parent a4bb610 commit 31f29b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/spatial/operators/spatial_join_physical.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,10 @@ SinkFinalizeType PhysicalSpatialJoin::Finalize(Pipeline &pipeline, Event &event,
613613

614614
auto &sel = *FlatVector::IncrementalSelectionVector();
615615
Vector geom_vec(GeoTypes::GEOMETRY());
616+
auto &validity = FlatVector::Validity(geom_vec);
616617

617618
do {
619+
validity.Reset();
618620
const auto row_count = iterator.GetCurrentChunkCount();
619621

620622
// We only need to fetch the build-side key column to build the rtree.
@@ -628,7 +630,7 @@ SinkFinalizeType PhysicalSpatialJoin::Finalize(Pipeline &pipeline, Event &event,
628630
const auto geom_ptr = FlatVector::GetData<geometry_t>(geom_vec);
629631
// Push the bounding boxes into the R-Tree
630632
for (idx_t row_idx = 0; row_idx < row_count; row_idx++) {
631-
if (FlatVector::IsNull(geom_vec, row_idx)) {
633+
if (!validity.RowIsValid(row_idx)) {
632634
// Skip null geometries
633635
continue;
634636
}

0 commit comments

Comments
 (0)