diff --git a/docs/generated/sql/functions.md b/docs/generated/sql/functions.md
index 157da03a4dc1..e6ed9825e1f9 100644
--- a/docs/generated/sql/functions.md
+++ b/docs/generated/sql/functions.md
@@ -2141,6 +2141,10 @@ The paths themselves are given in the direction of the first geometry.
st_summary(geography: geography) → string | Returns a text summary of the contents of the geography.
Flags shown square brackets after the geometry type have the following meaning:
diff --git a/pkg/cmd/roachtest/fixtures/1/checkpoint-v20.2.tgz b/pkg/cmd/roachtest/fixtures/1/checkpoint-v20.2.tgz
index 97b472efa5f7..fe9377b52a2e 100644
Binary files a/pkg/cmd/roachtest/fixtures/1/checkpoint-v20.2.tgz and b/pkg/cmd/roachtest/fixtures/1/checkpoint-v20.2.tgz differ
diff --git a/pkg/cmd/roachtest/fixtures/2/checkpoint-v20.2.tgz b/pkg/cmd/roachtest/fixtures/2/checkpoint-v20.2.tgz
index 7f06e5873a97..79eaea81fd70 100644
Binary files a/pkg/cmd/roachtest/fixtures/2/checkpoint-v20.2.tgz and b/pkg/cmd/roachtest/fixtures/2/checkpoint-v20.2.tgz differ
diff --git a/pkg/cmd/roachtest/fixtures/3/checkpoint-v20.2.tgz b/pkg/cmd/roachtest/fixtures/3/checkpoint-v20.2.tgz
index 9282bef6efe5..2874470d7e12 100644
Binary files a/pkg/cmd/roachtest/fixtures/3/checkpoint-v20.2.tgz and b/pkg/cmd/roachtest/fixtures/3/checkpoint-v20.2.tgz differ
diff --git a/pkg/cmd/roachtest/fixtures/4/checkpoint-v20.2.tgz b/pkg/cmd/roachtest/fixtures/4/checkpoint-v20.2.tgz
index a64c7653d27b..0ab925992941 100644
Binary files a/pkg/cmd/roachtest/fixtures/4/checkpoint-v20.2.tgz and b/pkg/cmd/roachtest/fixtures/4/checkpoint-v20.2.tgz differ
diff --git a/pkg/cmd/roachtest/test_runner.go b/pkg/cmd/roachtest/test_runner.go
index 6dc57eb2c9ad..7405ecaa294e 100644
--- a/pkg/cmd/roachtest/test_runner.go
+++ b/pkg/cmd/roachtest/test_runner.go
@@ -1176,7 +1176,7 @@ func PredecessorVersion(buildVersion version.Version) (string, error) {
// (see runVersionUpgrade). The same is true for adding a new key to this
// map.
verMap := map[string]string{
- "21.1": "20.2.0-rc.3",
+ "21.1": "20.2.2",
"20.2": "20.1.8",
"20.1": "19.2.11",
"19.2": "19.1.11",
diff --git a/pkg/cmd/roachtest/versionupgrade.go b/pkg/cmd/roachtest/versionupgrade.go
index e5ad997bec8f..156b23e54ba2 100644
--- a/pkg/cmd/roachtest/versionupgrade.go
+++ b/pkg/cmd/roachtest/versionupgrade.go
@@ -94,7 +94,7 @@ func runVersionUpgrade(ctx context.Context, t *test, c *cluster, buildVersion ve
// The version to create/update the fixture for. Must be released (i.e.
// can download it from the homepage); if that is not the case use the
// empty string which uses the local cockroach binary.
- newV := "20.2.0-rc.3"
+ newV := "20.2.2"
predV, err := PredecessorVersion(*version.MustParse("v" + newV))
if err != nil {
t.Fatal(err)
diff --git a/pkg/geo/geomfn/BUILD.bazel b/pkg/geo/geomfn/BUILD.bazel
index 3c0287f9a0c8..3c38c34921ac 100644
--- a/pkg/geo/geomfn/BUILD.bazel
+++ b/pkg/geo/geomfn/BUILD.bazel
@@ -25,6 +25,7 @@ go_library(
"reverse.go",
"segmentize.go",
"snap_to_grid.go",
+ "subdivide.go",
"swap_ordinates.go",
"topology_operations.go",
"unary_operators.go",
@@ -74,6 +75,7 @@ go_test(
"reverse_test.go",
"segmentize_test.go",
"snap_to_grid_test.go",
+ "subdivide_test.go",
"swap_ordinates_test.go",
"topology_operations_test.go",
"unary_operators_test.go",
diff --git a/pkg/geo/geomfn/subdivide.go b/pkg/geo/geomfn/subdivide.go
new file mode 100644
index 000000000000..c0b78d431c0c
--- /dev/null
+++ b/pkg/geo/geomfn/subdivide.go
@@ -0,0 +1,302 @@
+// Copyright 2020 The Cockroach Authors.
+//
+// Use of this software is governed by the Business Source License
+// included in the file licenses/BSL.txt.
+//
+// As of the Change Date specified in that file, in accordance with
+// the Business Source License, use of this software will be governed
+// by the Apache License, Version 2.0, included in the file
+// licenses/APL.txt.
+
+package geomfn
+
+import (
+ "math"
+
+ "github.com/cockroachdb/cockroach/pkg/geo"
+ "github.com/cockroachdb/errors"
+ "github.com/twpayne/go-geom"
+)
+
+// Subdivide returns a geometry divided into parts, where each part contains no more than the number of vertices provided.
+func Subdivide(g geo.Geometry, maxVertices int) ([]geo.Geometry, error) {
+ if g.Empty() {
+ return []geo.Geometry{g}, nil
+ }
+ const minMaxVertices = 5
+ if maxVertices < minMaxVertices {
+ return nil, errors.Newf("max_vertices number cannot be less than %v", minMaxVertices)
+ }
+
+ gt, err := g.AsGeomT()
+ if err != nil {
+ return nil, errors.Newf("could not transform input geometry into geom.T: %v", err)
+ }
+ dim, err := dimensionFromGeomT(gt)
+ if err != nil {
+ return nil, errors.Newf("could not calculate geometry dimension: %v", err)
+ }
+ // maxDepth 50 => 2^50 ~= 10^15 subdivisions.
+ const maxDepth = 50
+ const startDepth = 0
+ geomTs, err := subdivideRecursive(gt, maxVertices, startDepth, dim, maxDepth)
+ if err != nil {
+ return nil, err
+ }
+
+ output := []geo.Geometry{}
+ for _, cg := range geomTs {
+ geo.AdjustGeomTSRID(cg, g.SRID())
+ g, err := geo.MakeGeometryFromGeomT(cg)
+ if err != nil {
+ return []geo.Geometry{}, errors.Newf("could not transform output geom.T into geometry: %v", err)
+ }
+ output = append(output, g)
+ }
+ return output, nil
+}
+
+// subdivideRecursive performs the recursive subdivision on the gt provided.
+// Subdivided geom.T's that have less vertices than maxVertices are added to the results.
+// depth is compared with maxDepth, so that maximum number of subdivisions is never exceeded.
+// If gt passed is a GeometryCollection, some of the types may be shallower than the others.
+// We need dim to make sure that those geometries are ignored.
+func subdivideRecursive(
+ gt geom.T, maxVertices int, depth int, dim int, maxDepth int,
+) ([]geom.T, error) {
+ var results []geom.T
+ clip := geo.BoundingBoxFromGeomTGeometryType(gt)
+ width := clip.HiX - clip.LoX
+ height := clip.HiY - clip.LoY
+ if width == 0 && height == 0 {
+ // Point is a special case, because actual dimension is checked later in the code.
+ if gt, ok := gt.(*geom.Point); ok && dim == 0 {
+ results = append(results, gt)
+ }
+ return results, nil
+ }
+ // Boundaries needs to be widen slightly for intersection to work properly.
+ const tolerance = 1e-12
+ if width == 0 {
+ clip.HiX += tolerance
+ clip.LoX -= tolerance
+ width = 2 * tolerance
+ }
+ if height == 0 {
+ clip.HiY += tolerance
+ clip.LoY -= tolerance
+ height = 2 * tolerance
+ }
+ // Recurse into collections other than MultiPoint.
+ switch gt.(type) {
+ case *geom.MultiLineString, *geom.MultiPolygon, *geom.GeometryCollection:
+ err := forEachGeomTInCollectionForSubdivide(gt, func(gi geom.T) error {
+ // It's not a subdivision yet, so depth stays the same.
+ subdivisions, err := subdivideRecursive(gi, maxVertices, depth, dim, maxDepth)
+ if err != nil {
+ return err
+ }
+ results = append(results, subdivisions...)
+ return nil
+ })
+ if err != nil {
+ return nil, err
+ }
+ return results, nil
+ }
+ currDim, err := dimensionFromGeomT(gt)
+ if err != nil {
+ return nil, errors.Newf("error checking geom.T dimension: %v", err)
+ }
+ if currDim < dim {
+ // Ignore lower dimension object produced by clipping at a shallower recursion level.
+ return results, nil
+ }
+ if depth > maxDepth {
+ results = append(results, gt)
+ return results, nil
+ }
+ nVertices := CountVertices(gt)
+ if nVertices == 0 {
+ return results, nil
+ }
+ if nVertices <= maxVertices {
+ results = append(results, gt)
+ return results, nil
+ }
+
+ splitHorizontally := width > height
+ splitPoint, err := calculateSplitPointCoordForSubdivide(gt, nVertices, splitHorizontally, *clip)
+ if err != nil {
+ return nil, err
+ }
+ subBox1 := *clip
+ subBox2 := *clip
+ if splitHorizontally {
+ subBox1.HiX = splitPoint
+ subBox2.LoX = splitPoint
+ } else {
+ subBox1.HiY = splitPoint
+ subBox2.LoY = splitPoint
+ }
+
+ clipped1, err := clipGeomTByBoundingBoxForSubdivide(gt, &subBox1)
+ if err != nil {
+ return nil, errors.Newf("error clipping geom.T: %v", err)
+ }
+ clipped2, err := clipGeomTByBoundingBoxForSubdivide(gt, &subBox2)
+ if err != nil {
+ return nil, errors.Newf("error clipping geom.T: %v", err)
+ }
+ depth++
+ subdivisions1, err := subdivideRecursive(clipped1, maxVertices, depth, dim, maxDepth)
+ if err != nil {
+ return nil, err
+ }
+ subdivisions2, err := subdivideRecursive(clipped2, maxVertices, depth, dim, maxDepth)
+ if err != nil {
+ return nil, err
+ }
+ results = append(results, subdivisions1...)
+ results = append(results, subdivisions2...)
+ return results, nil
+}
+
+// forEachGeomTInCollectionForSubdivide calls the provided function for each geometry in the passed in collection.
+// Ignores MultiPoint input.
+func forEachGeomTInCollectionForSubdivide(gt geom.T, fn func(geom.T) error) error {
+ switch gt := gt.(type) {
+ case *geom.GeometryCollection:
+ for i := 0; i < gt.NumGeoms(); i++ {
+ err := fn(gt.Geom(i))
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+ case *geom.MultiPolygon:
+ for i := 0; i < gt.NumPolygons(); i++ {
+ err := fn(gt.Polygon(i))
+ if err != nil {
+ return err
+ }
+ }
+ case *geom.MultiLineString:
+ for i := 0; i < gt.NumLineStrings(); i++ {
+ err := fn(gt.LineString(i))
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// calculateSplitPointCoordForSubdivide calculates the coords that can be used for splitting
+// the geom.T provided and returns their X or Y value, depending on the splitHorizontally argument.
+// These coords will be coords of the closest point to the center in case of a Polygon
+// and simply the center coords in case of any other geometry type or
+// closest point to the center being on the boundaries.
+// Specialized to be used by the Subdivide function.
+func calculateSplitPointCoordForSubdivide(
+ gt geom.T, nVertices int, splitHorizontally bool, clip geo.CartesianBoundingBox,
+) (float64, error) {
+ var pivot float64
+ switch gt := gt.(type) {
+ case *geom.Polygon:
+ var err error
+ pivot, err = findMostCentralPointValueForPolygon(gt, nVertices, splitHorizontally, &clip)
+ if err != nil {
+ return 0, errors.Newf("error finding most central point for polygon: %v", err)
+ }
+ if splitHorizontally {
+ // Ignore point on the boundaries
+ if clip.LoX == pivot || clip.HiX == pivot {
+ pivot = (clip.LoX + clip.HiX) / 2
+ }
+ } else {
+ // Ignore point on the boundaries
+ if clip.LoY == pivot || clip.HiY == pivot {
+ pivot = (clip.LoY + clip.HiY) / 2
+ }
+ }
+ default:
+ if splitHorizontally {
+ pivot = (clip.LoX + clip.HiX) / 2
+ } else {
+ pivot = (clip.LoY + clip.HiY) / 2
+ }
+ }
+ return pivot, nil
+}
+
+// findMostCentralPointValueForPolygon finds the value of the most central point for a geom.Polygon.
+// Can be X or Y value, depending on the splitHorizontally argument.
+func findMostCentralPointValueForPolygon(
+ poly *geom.Polygon, nVertices int, splitHorizontally bool, clip *geo.CartesianBoundingBox,
+) (float64, error) {
+ pivot := math.MaxFloat64
+ ringToTrimIndex := 0
+ ringArea := float64(0)
+ pivotEps := math.MaxFloat64
+ var ptEps float64
+ nVerticesOuterRing := CountVertices(poly.LinearRing(0))
+ if nVertices >= 2*nVerticesOuterRing {
+ // When there are more points in holes than in outer ring, trim holes starting from biggest.
+ for i := 1; i < poly.NumLinearRings(); i++ {
+ currentRingArea := poly.LinearRing(i).Area()
+ if currentRingArea >= ringArea {
+ ringArea = currentRingArea
+ ringToTrimIndex = i
+ }
+ }
+ }
+ pa := poly.LinearRing(ringToTrimIndex)
+ // Find the most central point in the chosen ring.
+ for j := 0; j < pa.NumCoords(); j++ {
+ var pt float64
+ if splitHorizontally {
+ pt = pa.Coord(j).X()
+ xHalf := (clip.LoX + clip.HiX) / 2
+ ptEps = math.Abs(pt - xHalf)
+ } else {
+ pt = pa.Coord(j).Y()
+ yHalf := (clip.LoY + clip.HiY) / 2
+ ptEps = math.Abs(pt - yHalf)
+ }
+ if ptEps < pivotEps {
+ pivot = pt
+ pivotEps = ptEps
+ }
+ }
+ return pivot, nil
+}
+
+// clipGeomTByBoundingBoxForSubdivide returns a result of intersection and simplification of the geom.T and bounding box provided.
+// The result is also a geom.T.
+// Specialized to be used in the Subdivide function.
+func clipGeomTByBoundingBoxForSubdivide(gt geom.T, clip *geo.CartesianBoundingBox) (geom.T, error) {
+ g, err := geo.MakeGeometryFromGeomT(gt)
+ if err != nil {
+ return nil, errors.Newf("error transforming geom.T to geometry: %v", err)
+ }
+ clipgt := clip.ToGeomT(g.SRID())
+ clipg, err := geo.MakeGeometryFromGeomT(clipgt)
+ if err != nil {
+ return nil, errors.Newf("error transforming geom.T to geometry: %v", err)
+ }
+ out, err := Intersection(g, clipg)
+ if err != nil {
+ return nil, errors.Newf("error applying intersection: %v", err)
+ }
+ // Simplify is required to remove the unnecessary points. Otherwise vertices count is altered and too many subdivision may be returned.
+ out, err = Simplify(out, 0)
+ if err != nil {
+ return nil, errors.Newf("simplifying error: %v", err)
+ }
+ gt, err = out.AsGeomT()
+ if err != nil {
+ return nil, errors.Newf("error transforming geometry to geom.T: %v", err)
+ }
+ return gt, nil
+}
diff --git a/pkg/geo/geomfn/subdivide_test.go b/pkg/geo/geomfn/subdivide_test.go
new file mode 100644
index 000000000000..49058aa58f42
--- /dev/null
+++ b/pkg/geo/geomfn/subdivide_test.go
@@ -0,0 +1,214 @@
+// Copyright 2020 The Cockroach Authors.
+//
+// Use of this software is governed by the Business Source License
+// included in the file licenses/BSL.txt.
+//
+// As of the Change Date specified in that file, in accordance with
+// the Business Source License, use of this software will be governed
+// by the Apache License, Version 2.0, included in the file
+// licenses/APL.txt.
+
+package geomfn
+
+import (
+ "testing"
+
+ "github.com/cockroachdb/cockroach/pkg/geo"
+ "github.com/cockroachdb/cockroach/pkg/geo/geopb"
+ "github.com/stretchr/testify/require"
+)
+
+func TestSubdivide(t *testing.T) {
+ type args struct {
+ g geo.Geometry
+ maxVertices int
+ }
+ tests := []struct {
+ name string
+ args args
+ want []geo.Geometry
+ }{
+ {
+ "empty geometry",
+ args{geo.MustParseGeometry("POLYGON EMPTY"), 5},
+ []geo.Geometry{geo.MustParseGeometry("POLYGON EMPTY")},
+ },
+ {
+ "width and height bounds equal to zero",
+ args{geo.MustParseGeometry("POINT(1 10)"), 5},
+ []geo.Geometry{geo.MustParseGeometry("POINT (1 10)")},
+ },
+ {
+ "single geometry, no. of vertices under tolerance",
+ args{geo.MustParseGeometry("LINESTRING(0 0, 10 10, 0 10, 10 0)"), 5},
+ []geo.Geometry{geo.MustParseGeometry("LINESTRING(0 0, 10 10, 0 10, 10 0)")},
+ },
+ {
+ "Polygon, width > height",
+ args{geo.MustParseGeometry("POLYGON((-1 -1,-1 -0.5, -1 0, 1 0.5, 1 -1,-1 -1))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((-1 -1,-1 0,0 0.25,0 -1,-1 -1))"),
+ geo.MustParseGeometry("POLYGON((0 0.25, 1 0.5, 1 -1, 0 -1, 0 0.25))"),
+ },
+ },
+ {
+ "invalid (bow-tie) Polygon, width > height",
+ args{geo.MustParseGeometry("POLYGON((0 0, -2 -1, -2 1, 0 0, 2 1, 2 -1, 0 0))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((0 0, -2 -1, -2 1, 0 0))"),
+ geo.MustParseGeometry("POLYGON((0 0, 2 1, 2 -1, 0 0))"),
+ },
+ },
+ {
+ "invalid (bow-tie) Polygon, height > width",
+ args{geo.MustParseGeometry("POLYGON((0 0, -1 -2, -1 2, 0 0, 1 2, 1 -2, 0 0))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((0 0, 1 0, 1 -2, 0 0))"),
+ geo.MustParseGeometry("POLYGON((0 0,-1 -2,-1 0,0 0))"),
+ geo.MustParseGeometry("POLYGON((-1 0,-1 2,0 0,-1 0))"),
+ geo.MustParseGeometry("POLYGON((0 0,1 2,1 0,0 0))"),
+ },
+ },
+ {
+ "Polygon, 12 decimal points precision",
+ args{geo.MustParseGeometry("POLYGON((-0.1 -0.1,-0.1 -0.000000000005, -0.1 0, 0.1 0.000000000005, 0.1 -0.1,-0.1 -0.1))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((-0.1 -0.1,-0.1 0,0 0.0000000000025,0 -0.1,-0.1 -0.1))"),
+ geo.MustParseGeometry("POLYGON((0 0.0000000000025, 0.1 0.000000000005, 0.1 -0.1, 0 -0.1, 0 0.0000000000025))"),
+ },
+ },
+ {
+ "Polygon, trapezoid+rectangle",
+ args{geo.MustParseGeometry("POLYGON((-1 0, -1 1, 0 2, 3 2, 3 0, -1 0))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((-1 0,-1 1,0 2,0 0,-1 0))"),
+ geo.MustParseGeometry("POLYGON((0 2,3 2,3 0,0 0,0 2))"),
+ },
+ },
+ {
+ "Polygon with a hole inside",
+ args{geo.MustParseGeometry("POLYGON((-1 -1, -1 1, 0 2, 1 1, 1 -1, 0 -2, -1 -1),(-0.5 -0.5, -0.5 0.5, 0.5 0.5, 0.5 -0.5, 0 -0.5, -0.5 -0.5))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((1 -1,0 -2,-1 -1,1 -1))"),
+ geo.MustParseGeometry("POLYGON((-1 -1,-1 -0.5,1 -0.5,1 -1,-1 -1))"),
+ geo.MustParseGeometry("POLYGON((-1 -0.5,-1 0.5,-0.5 0.5,-0.5 -0.5,-1 -0.5))"),
+ geo.MustParseGeometry("POLYGON((-1 0.5,-1 1,0.5 1,0.5 0.5,-1 0.5))"),
+ geo.MustParseGeometry("POLYGON((0.5 1,1 1,1 -0.5,0.5 -0.5,0.5 1))"),
+ geo.MustParseGeometry("POLYGON((-1 1,0 2,1 1,-1 1))"),
+ },
+ },
+ {
+ "LineString, width < height ",
+ args{geo.MustParseGeometry("LINESTRING(0 0, 10 15, 0 0, 10 15, 10 0, 10 15)"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("LINESTRING(0 0,5 7.5)"),
+ geo.MustParseGeometry("LINESTRING(10 7.5,10 0)"),
+ geo.MustParseGeometry("LINESTRING(5 7.5,10 15)"),
+ geo.MustParseGeometry("LINESTRING(10 15,10 7.5)"),
+ },
+ },
+ {
+ "LineString, width > height",
+ args{geo.MustParseGeometry("LINESTRING(0 0, 15 10, 0 0, 15 10, 15 0, 15 10)"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("LINESTRING(0 0,7.5 5)"),
+ geo.MustParseGeometry("LINESTRING(7.5 5,15 10)"),
+ geo.MustParseGeometry("LINESTRING(15 10,15 0)"),
+ },
+ },
+ {
+ "LineString with specified SRID",
+ args{geo.MustParseGeometry("SRID=4269;LINESTRING(0 0, 10 15, 0 0, 10 15, 10 0, 10 15)"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("SRID=4269;LINESTRING(0 0,5 7.5)"),
+ geo.MustParseGeometry("SRID=4269;LINESTRING(10 7.5,10 0)"),
+ geo.MustParseGeometry("SRID=4269;LINESTRING(5 7.5,10 15)"),
+ geo.MustParseGeometry("SRID=4269;LINESTRING(10 15,10 7.5)"),
+ },
+ },
+ {
+ "MultiLineString - horizontal and vertical lines",
+ args{geo.MustParseGeometry("MULTILINESTRING((5 0, 5 1, 5 3, 5 4, 5 5, 5 6),(0 5, 1 5, 2 5, 3 5, 4 5, 6 5))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("LINESTRING(5 0,5 3)"),
+ geo.MustParseGeometry("LINESTRING(5 3,5 6)"),
+ geo.MustParseGeometry("LINESTRING(0 5,3 5)"),
+ geo.MustParseGeometry("LINESTRING(3 5,6 5)"),
+ },
+ },
+ {
+ "MultiPoint, max vertices 6",
+ args{geo.MustParseGeometry("MULTIPOINT((0 1),(1 2),(2 3),(3 4),(4 3),(6 2),(7 1),(8 0),(9 -1),(10 -2),(11 -3))"), 6},
+ []geo.Geometry{
+ geo.MustParseGeometry("MULTIPOINT(0 1,1 2,2 3,3 4,4 3)"),
+ geo.MustParseGeometry("MULTIPOINT(6 2,7 1,8 0,9 -1,10 -2,11 -3)"),
+ },
+ },
+ {
+ "GeometryCollection, types with different dimensions",
+ args{geo.MustParseGeometry("GEOMETRYCOLLECTION(LINESTRING(0 0, 10 10, 0 10, 10 0), POLYGON((0 0, -2 -1, -2 1, 0 0, 2 1, 2 -1, 0 0)))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((0 0,-2 -1,-2 1,0 0))"),
+ geo.MustParseGeometry("POLYGON((0 0,2 1,2 -1,0 0))"),
+ },
+ },
+ {
+ "GeometryCollection, types with different dimensions, point included",
+ args{geo.MustParseGeometry("GEOMETRYCOLLECTION(LINESTRING(0 0, 10 10, 0 10, 10 0), POINT(1 10))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("LINESTRING(0 0,10 10,0 10,10 0)"),
+ },
+ },
+ {
+ "GeometryCollection, same types, one invalid",
+ args{geo.MustParseGeometry("GEOMETRYCOLLECTION(POLYGON((0 0, -2 -1, -2 1, 0 0, 2 1, 2 -1, 0 0)),POLYGON((-1 -1,-1 -0.5, -1 0, 1 0.5, 1 -1,-1 -1)))"), 5},
+ []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((0 0,-2 -1,-2 1,0 0))"),
+ geo.MustParseGeometry("POLYGON((0 0,2 1,2 -1,0 0))"),
+ geo.MustParseGeometry("POLYGON((-1 -1,-1 0,0 0.25,0 -1,-1 -1))"),
+ geo.MustParseGeometry("POLYGON((0 0.25, 1 0.5, 1 -1, 0 -1, 0 0.25))"),
+ },
+ },
+ }
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ got, err := Subdivide(tt.args.g, tt.args.maxVertices)
+ require.NoError(t, err)
+ require.Equal(t, tt.want, got)
+ })
+ }
+
+ t.Run("less max vertices than minimum acceptable", func(t *testing.T) {
+ _, err := Subdivide(geo.MustParseGeometry("LINESTRING(0 0, -10 10, 0 10)"), 4)
+ require.Error(t, err)
+ require.Equal(t, "max_vertices number cannot be less than 5", err.Error())
+ })
+
+ t.Run("would need to divide more than the maximum depth", func(t *testing.T) {
+ g := geo.MustParseGeometry("POLYGON((-1 -1, -1 1, 0 2, 1 1, 1 -1, 0 -2, -1 -1),(-0.5 -0.5, -0.5 0.5, 0.5 0.5, 0.5 -0.5, 0 -0.5, -0.5 -0.5))")
+ gt, err := g.AsGeomT()
+ require.NoError(t, err)
+ dim, err := dimensionFromGeomT(gt)
+ require.NoError(t, err)
+ const maxDepth = 2
+ const startDepth = 0
+ const maxVertices = 5
+ geomTs, err := subdivideRecursive(gt, maxVertices, startDepth, dim, maxDepth)
+ require.NoError(t, err)
+ got := []geo.Geometry{}
+ for _, cg := range geomTs {
+ g, err := geo.MakeGeometryFromGeomT(cg)
+ require.NoError(t, err)
+ g, err = g.CloneWithSRID(geopb.SRID(gt.SRID()))
+ require.NoError(t, err)
+ got = append(got, g)
+ }
+ want := []geo.Geometry{
+ geo.MustParseGeometry("POLYGON((1 -1, 0 -2, -1 -1, 1 -1))"),
+ geo.MustParseGeometry("POLYGON((-1 -1, -1 -0.5, 1 -0.5, 1 -1, -1 -1))"),
+ geo.MustParseGeometry("POLYGON((-1 -0.5, -1 1, 1 1, 1 -0.5, 0.5 -0.5, 0.5 0.5, -0.5 0.5, -0.5 -0.5, -1 -0.5))"),
+ geo.MustParseGeometry("POLYGON((-1 1, 0 2, 1 1, -1 1))"),
+ }
+ require.Equal(t, want, got)
+ })
+}
diff --git a/pkg/geo/geomfn/unary_operators.go b/pkg/geo/geomfn/unary_operators.go
index e4f11be18c9b..80cda8f38431 100644
--- a/pkg/geo/geomfn/unary_operators.go
+++ b/pkg/geo/geomfn/unary_operators.go
@@ -232,3 +232,18 @@ func MinimumClearanceLine(g geo.Geometry) (geo.Geometry, error) {
}
return geo.ParseGeometryFromEWKB(retEWKB)
}
+
+// CountVertices returns a number of vertices (points) for the geom.T provided.
+func CountVertices(t geom.T) int {
+ switch t := t.(type) {
+ case *geom.GeometryCollection:
+ // FlatCoords() does not work on GeometryCollection.
+ numPoints := 0
+ for _, g := range t.Geoms() {
+ numPoints += CountVertices(g)
+ }
+ return numPoints
+ default:
+ return len(t.FlatCoords()) / t.Stride()
+ }
+}
diff --git a/pkg/sql/colexec/colbuilder/execplan.go b/pkg/sql/colexec/colbuilder/execplan.go
index 9a27499807fd..3a56110cb469 100644
--- a/pkg/sql/colexec/colbuilder/execplan.go
+++ b/pkg/sql/colexec/colbuilder/execplan.go
@@ -187,6 +187,9 @@ func supportedNatively(spec *execinfrapb.ProcessorSpec) error {
}
return nil
+ case spec.Core.Filterer != nil:
+ return nil
+
case spec.Core.Aggregator != nil:
aggSpec := spec.Core.Aggregator
needHash, err := needHashAggregator(aggSpec)
@@ -290,6 +293,7 @@ func canWrap(mode sessiondatapb.VectorizeExecMode, spec *execinfrapb.ProcessorSp
switch {
case spec.Core.Noop != nil:
case spec.Core.TableReader != nil:
+ case spec.Core.Filterer != nil:
case spec.Core.JoinReader != nil:
case spec.Core.Sorter != nil:
case spec.Core.Aggregator != nil:
@@ -411,10 +415,10 @@ func (r opResult) createDiskBackedSort(
colmem.NewAllocator(ctx, sortChunksMemAccount, factory), input, inputTypes,
ordering.Columns, int(matchLen),
)
- } else if post.Limit != 0 && post.Filter.Empty() && post.Limit < math.MaxUint64-post.Offset {
- // There is a limit specified with no post-process filter, so we know
- // exactly how many rows the sorter should output. The last part of the
- // condition is making sure there is no overflow.
+ } else if post.Limit != 0 && post.Limit < math.MaxUint64-post.Offset {
+ // There is a limit specified, so we know exactly how many rows the sorter
+ // should output. The last part of the condition is making sure there is no
+ // overflow.
//
// Choose a top K sorter, which uses a heap to avoid storing more rows
// than necessary.
@@ -726,6 +730,19 @@ func NewColOperator(
// performing long operations.
result.Op = colexec.NewCancelChecker(result.Op)
result.ColumnTypes = scanOp.ResultTypes
+
+ case core.Filterer != nil:
+ if err := checkNumIn(inputs, 1); err != nil {
+ return r, err
+ }
+
+ result.ColumnTypes = make([]*types.T, len(spec.Input[0].ColumnTypes))
+ copy(result.ColumnTypes, spec.Input[0].ColumnTypes)
+ result.Op = inputs[0]
+ if err := result.planAndMaybeWrapFilter(ctx, flowCtx, evalCtx, args, core.Filterer.Filter, factory); err != nil {
+ return r, err
+ }
+
case core.Aggregator != nil:
if err := checkNumIn(inputs, 1); err != nil {
return r, err
@@ -935,10 +952,9 @@ func NewColOperator(
}
if !core.HashJoiner.OnExpr.Empty() && core.HashJoiner.Type == descpb.InnerJoin {
- if err =
- result.planAndMaybeWrapOnExprAsFilter(
- ctx, flowCtx, evalCtx, args, core.HashJoiner.OnExpr, factory,
- ); err != nil {
+ if err = result.planAndMaybeWrapFilter(
+ ctx, flowCtx, evalCtx, args, core.HashJoiner.OnExpr, factory,
+ ); err != nil {
return r, err
}
}
@@ -996,7 +1012,7 @@ func NewColOperator(
}
if onExpr != nil {
- if err = result.planAndMaybeWrapOnExprAsFilter(
+ if err = result.planAndMaybeWrapFilter(
ctx, flowCtx, evalCtx, args, *onExpr, factory,
); err != nil {
return r, err
@@ -1227,36 +1243,44 @@ func NewColOperator(
return r, err
}
-// planAndMaybeWrapOnExprAsFilter plans a joiner ON expression as a filter. If
-// the filter is unsupported, it is planned as a wrapped noop processor with
-// the filter as a post-processing stage.
-func (r opResult) planAndMaybeWrapOnExprAsFilter(
+// planAndMaybeWrapFilter plans a filter. If the filter is unsupported, it is
+// planned as a wrapped filterer processor.
+func (r opResult) planAndMaybeWrapFilter(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
evalCtx *tree.EvalContext,
args *colexec.NewColOperatorArgs,
- onExpr execinfrapb.Expression,
+ filter execinfrapb.Expression,
factory coldata.ColumnFactory,
) error {
- ppr := postProcessResult{
- Op: r.Op,
- ColumnTypes: r.ColumnTypes,
- }
- if err := ppr.planFilterExpr(ctx, flowCtx, evalCtx, onExpr, args.StreamingMemAccount, factory, args.ExprHelper); err != nil {
+ op, err := planFilterExpr(
+ ctx, flowCtx, evalCtx, r.Op, r.ColumnTypes, filter, args.StreamingMemAccount, factory, args.ExprHelper,
+ )
+ if err != nil {
// ON expression planning failed. Fall back to planning the filter
// using row execution.
if log.V(2) {
log.Infof(
ctx,
"vectorized join ON expr planning failed with error %v ON expr is %s, attempting to wrap as a row source",
- err, onExpr.String(),
+ err, filter.String(),
)
}
- onExprAsFilter := &execinfrapb.PostProcessSpec{Filter: onExpr}
- return r.wrapPostProcessSpec(ctx, flowCtx, args, onExprAsFilter, args.Spec.ResultTypes, factory, err)
+ filtererSpec := &execinfrapb.ProcessorSpec{
+ Core: execinfrapb.ProcessorCoreUnion{
+ Filterer: &execinfrapb.FiltererSpec{
+ Filter: filter,
+ },
+ },
+ ResultTypes: args.Spec.ResultTypes,
+ }
+ return r.createAndWrapRowSource(
+ ctx, flowCtx, args, []colexecbase.Operator{r.Op}, [][]*types.T{r.ColumnTypes},
+ filtererSpec, factory, err,
+ )
}
- r.updateWithPostProcessResult(ppr)
+ r.Op = op
return nil
}
@@ -1297,12 +1321,6 @@ func (r *postProcessResult) planPostProcessSpec(
post *execinfrapb.PostProcessSpec,
factory coldata.ColumnFactory,
) error {
- if !post.Filter.Empty() {
- if err := r.planFilterExpr(ctx, flowCtx, evalCtx, post.Filter, args.StreamingMemAccount, factory, args.ExprHelper); err != nil {
- return err
- }
- }
-
if post.Projection {
r.Op, r.ColumnTypes = addProjection(r.Op, r.ColumnTypes, post.OutputColumns)
} else if post.RenderExprs != nil {
@@ -1439,43 +1457,43 @@ func (r opResult) updateWithPostProcessResult(ppr postProcessResult) {
}
// planFilterExpr creates all operators to implement filter expression.
-func (r *postProcessResult) planFilterExpr(
+func planFilterExpr(
ctx context.Context,
flowCtx *execinfra.FlowCtx,
evalCtx *tree.EvalContext,
+ input colexecbase.Operator,
+ columnTypes []*types.T,
filter execinfrapb.Expression,
acc *mon.BoundAccount,
factory coldata.ColumnFactory,
helper *colexec.ExprHelper,
-) error {
+) (colexecbase.Operator, error) {
semaCtx := flowCtx.TypeResolverFactory.NewSemaContext(evalCtx.Txn)
- expr, err := helper.ProcessExpr(filter, semaCtx, evalCtx, r.ColumnTypes)
+ expr, err := helper.ProcessExpr(filter, semaCtx, evalCtx, columnTypes)
if err != nil {
- return err
+ return nil, err
}
if expr == tree.DNull {
// The filter expression is tree.DNull meaning that it is always false, so
// we put a zero operator.
- r.Op = colexec.NewZeroOp(r.Op)
- return nil
+ return colexec.NewZeroOp(input), nil
}
- var filterColumnTypes []*types.T
- r.Op, _, filterColumnTypes, err = planSelectionOperators(
- ctx, evalCtx, expr, r.ColumnTypes, r.Op, acc, factory,
+ op, _, filterColumnTypes, err := planSelectionOperators(
+ ctx, evalCtx, expr, columnTypes, input, acc, factory,
)
if err != nil {
- return errors.Wrapf(err, "unable to columnarize filter expression %q", filter)
+ return nil, errors.Wrapf(err, "unable to columnarize filter expression %q", filter)
}
- if len(filterColumnTypes) > len(r.ColumnTypes) {
+ if len(filterColumnTypes) > len(columnTypes) {
// Additional columns were appended to store projections while evaluating
// the filter. Project them away.
var outputColumns []uint32
- for i := range r.ColumnTypes {
+ for i := range columnTypes {
outputColumns = append(outputColumns, uint32(i))
}
- r.Op = colexec.NewSimpleProjectOp(r.Op, len(filterColumnTypes), outputColumns)
+ op = colexec.NewSimpleProjectOp(op, len(filterColumnTypes), outputColumns)
}
- return nil
+ return op, nil
}
// addProjection adds a simple projection on top of op according to projection
diff --git a/pkg/sql/colexec/is_null_ops_test.go b/pkg/sql/colexec/is_null_ops_test.go
index 2fd6e58296ba..a788a0864fb0 100644
--- a/pkg/sql/colexec/is_null_ops_test.go
+++ b/pkg/sql/colexec/is_null_ops_test.go
@@ -232,10 +232,9 @@ func TestIsNullSelOp(t *testing.T) {
spec := &execinfrapb.ProcessorSpec{
Input: []execinfrapb.InputSyncSpec{{ColumnTypes: typs}},
Core: execinfrapb.ProcessorCoreUnion{
- Noop: &execinfrapb.NoopCoreSpec{},
- },
- Post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: fmt.Sprintf("@1 %s", c.selExpr)},
+ Filterer: &execinfrapb.FiltererSpec{
+ Filter: execinfrapb.Expression{Expr: fmt.Sprintf("@1 %s", c.selExpr)},
+ },
},
ResultTypes: typs,
}
diff --git a/pkg/sql/distsql/columnar_operators_test.go b/pkg/sql/distsql/columnar_operators_test.go
index 7226f5bd83b5..1b7ce3ad0153 100644
--- a/pkg/sql/distsql/columnar_operators_test.go
+++ b/pkg/sql/distsql/columnar_operators_test.go
@@ -618,127 +618,117 @@ func TestHashJoinerAgainstProcessor(t *testing.T) {
for _, testSpec := range testSpecs {
for nCols := 1; nCols <= maxCols; nCols++ {
for nEqCols := 1; nEqCols <= nCols; nEqCols++ {
- for _, addFilter := range getAddFilterOptions(testSpec.joinType, nEqCols < nCols) {
- triedWithoutOnExpr, triedWithOnExpr := false, false
- if !testSpec.onExprSupported {
- triedWithOnExpr = true
+ triedWithoutOnExpr, triedWithOnExpr := false, false
+ if !testSpec.onExprSupported {
+ triedWithOnExpr = true
+ }
+ for !triedWithoutOnExpr || !triedWithOnExpr {
+ var (
+ lRows, rRows rowenc.EncDatumRows
+ lEqCols, rEqCols []uint32
+ lInputTypes, rInputTypes []*types.T
+ usingRandomTypes bool
+ )
+ if rng.Float64() < randTypesProbability {
+ lInputTypes = generateRandomSupportedTypes(rng, nCols)
+ lEqCols = generateEqualityColumns(rng, nCols, nEqCols)
+ rInputTypes = append(rInputTypes[:0], lInputTypes...)
+ rEqCols = append(rEqCols[:0], lEqCols...)
+ rng.Shuffle(nEqCols, func(i, j int) {
+ iColIdx, jColIdx := rEqCols[i], rEqCols[j]
+ rInputTypes[iColIdx], rInputTypes[jColIdx] = rInputTypes[jColIdx], rInputTypes[iColIdx]
+ rEqCols[i], rEqCols[j] = rEqCols[j], rEqCols[i]
+ })
+ rInputTypes = randomizeJoinRightTypes(rng, rInputTypes)
+ lRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, lInputTypes)
+ rRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, rInputTypes)
+ usingRandomTypes = true
+ } else {
+ lInputTypes = intTyps[:nCols]
+ rInputTypes = lInputTypes
+ lRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
+ rRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
+ lEqCols = generateEqualityColumns(rng, nCols, nEqCols)
+ rEqCols = generateEqualityColumns(rng, nCols, nEqCols)
}
- for !triedWithoutOnExpr || !triedWithOnExpr {
- var (
- lRows, rRows rowenc.EncDatumRows
- lEqCols, rEqCols []uint32
- lInputTypes, rInputTypes []*types.T
- usingRandomTypes bool
- )
- if rng.Float64() < randTypesProbability {
- lInputTypes = generateRandomSupportedTypes(rng, nCols)
- lEqCols = generateEqualityColumns(rng, nCols, nEqCols)
- rInputTypes = append(rInputTypes[:0], lInputTypes...)
- rEqCols = append(rEqCols[:0], lEqCols...)
- rng.Shuffle(nEqCols, func(i, j int) {
- iColIdx, jColIdx := rEqCols[i], rEqCols[j]
- rInputTypes[iColIdx], rInputTypes[jColIdx] = rInputTypes[jColIdx], rInputTypes[iColIdx]
- rEqCols[i], rEqCols[j] = rEqCols[j], rEqCols[i]
- })
- rInputTypes = randomizeJoinRightTypes(rng, rInputTypes)
- lRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, lInputTypes)
- rRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, rInputTypes)
- usingRandomTypes = true
- } else {
- lInputTypes = intTyps[:nCols]
- rInputTypes = lInputTypes
- lRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
- rRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
- lEqCols = generateEqualityColumns(rng, nCols, nEqCols)
- rEqCols = generateEqualityColumns(rng, nCols, nEqCols)
- }
- var outputTypes []*types.T
- if testSpec.joinType.ShouldIncludeLeftColsInOutput() {
- outputTypes = append(outputTypes, lInputTypes...)
- }
- if testSpec.joinType.ShouldIncludeRightColsInOutput() {
- outputTypes = append(outputTypes, rInputTypes...)
- }
- outputColumns := make([]uint32, len(outputTypes))
- for i := range outputColumns {
- outputColumns[i] = uint32(i)
- }
+ var outputTypes []*types.T
+ if testSpec.joinType.ShouldIncludeLeftColsInOutput() {
+ outputTypes = append(outputTypes, lInputTypes...)
+ }
+ if testSpec.joinType.ShouldIncludeRightColsInOutput() {
+ outputTypes = append(outputTypes, rInputTypes...)
+ }
+ outputColumns := make([]uint32, len(outputTypes))
+ for i := range outputColumns {
+ outputColumns[i] = uint32(i)
+ }
- var filter, onExpr execinfrapb.Expression
- if addFilter {
- forceSingleSide := !testSpec.joinType.ShouldIncludeLeftColsInOutput() ||
- !testSpec.joinType.ShouldIncludeRightColsInOutput()
- filter = generateFilterExpr(
- rng, nCols, nEqCols, outputTypes, usingRandomTypes, forceSingleSide,
- )
- }
- if triedWithoutOnExpr {
- colTypes := append(lInputTypes, rInputTypes...)
- onExpr = generateFilterExpr(
- rng, nCols, nEqCols, colTypes, usingRandomTypes, false, /* forceSingleSide */
- )
- }
- hjSpec := &execinfrapb.HashJoinerSpec{
- LeftEqColumns: lEqCols,
- RightEqColumns: rEqCols,
- OnExpr: onExpr,
- Type: testSpec.joinType,
- }
- pspec := &execinfrapb.ProcessorSpec{
- Input: []execinfrapb.InputSyncSpec{
- {ColumnTypes: lInputTypes},
- {ColumnTypes: rInputTypes},
- },
- Core: execinfrapb.ProcessorCoreUnion{HashJoiner: hjSpec},
- Post: execinfrapb.PostProcessSpec{
- Projection: true,
- OutputColumns: outputColumns,
- Filter: filter,
- },
- ResultTypes: outputTypes,
- }
- args := verifyColOperatorArgs{
- anyOrder: true,
- inputTypes: [][]*types.T{lInputTypes, rInputTypes},
- inputs: []rowenc.EncDatumRows{lRows, rRows},
- pspec: pspec,
- forceDiskSpill: spillForced,
- // It is possible that we have a filter that is always false, and this
- // will allow us to plan a zero operator which always returns a zero
- // batch. In such case, the spilling might not occur and that's ok.
- forcedDiskSpillMightNotOccur: !filter.Empty() || !onExpr.Empty(),
- numForcedRepartitions: 2,
- rng: rng,
- }
- if testSpec.joinType.IsSetOpJoin() && nEqCols < nCols {
- // The output of set operation joins is not fully
- // deterministic when there are non-equality
- // columns, however, the rows must match on the
- // equality columns between vectorized and row
- // executions.
- args.colIdxsToCheckForEquality = make([]int, nEqCols)
- for i := range args.colIdxsToCheckForEquality {
- args.colIdxsToCheckForEquality[i] = int(lEqCols[i])
- }
+ var onExpr execinfrapb.Expression
+ if triedWithoutOnExpr {
+ colTypes := append(lInputTypes, rInputTypes...)
+ onExpr = generateFilterExpr(
+ rng, nCols, nEqCols, colTypes, usingRandomTypes, false, /* forceSingleSide */
+ )
+ }
+ hjSpec := &execinfrapb.HashJoinerSpec{
+ LeftEqColumns: lEqCols,
+ RightEqColumns: rEqCols,
+ OnExpr: onExpr,
+ Type: testSpec.joinType,
+ }
+ pspec := &execinfrapb.ProcessorSpec{
+ Input: []execinfrapb.InputSyncSpec{
+ {ColumnTypes: lInputTypes},
+ {ColumnTypes: rInputTypes},
+ },
+ Core: execinfrapb.ProcessorCoreUnion{HashJoiner: hjSpec},
+ Post: execinfrapb.PostProcessSpec{
+ Projection: true,
+ OutputColumns: outputColumns,
+ },
+ ResultTypes: outputTypes,
+ }
+ args := verifyColOperatorArgs{
+ anyOrder: true,
+ inputTypes: [][]*types.T{lInputTypes, rInputTypes},
+ inputs: []rowenc.EncDatumRows{lRows, rRows},
+ pspec: pspec,
+ forceDiskSpill: spillForced,
+ // It is possible that we have a filter that is always false, and this
+ // will allow us to plan a zero operator which always returns a zero
+ // batch. In such case, the spilling might not occur and that's ok.
+ forcedDiskSpillMightNotOccur: !onExpr.Empty(),
+ numForcedRepartitions: 2,
+ rng: rng,
+ }
+ if testSpec.joinType.IsSetOpJoin() && nEqCols < nCols {
+ // The output of set operation joins is not fully
+ // deterministic when there are non-equality
+ // columns, however, the rows must match on the
+ // equality columns between vectorized and row
+ // executions.
+ args.colIdxsToCheckForEquality = make([]int, nEqCols)
+ for i := range args.colIdxsToCheckForEquality {
+ args.colIdxsToCheckForEquality[i] = int(lEqCols[i])
}
+ }
- if err := verifyColOperator(t, args); err != nil {
- fmt.Printf("--- spillForced = %t join type = %s onExpr = %q"+
- " filter = %q seed = %d run = %d ---\n",
- spillForced, testSpec.joinType.String(), onExpr.Expr, filter.Expr, seed, run)
- fmt.Printf("--- lEqCols = %v rEqCols = %v ---\n", lEqCols, rEqCols)
- prettyPrintTypes(lInputTypes, "left_table" /* tableName */)
- prettyPrintTypes(rInputTypes, "right_table" /* tableName */)
- prettyPrintInput(lRows, lInputTypes, "left_table" /* tableName */)
- prettyPrintInput(rRows, rInputTypes, "right_table" /* tableName */)
- t.Fatal(err)
- }
- if onExpr.Expr == "" {
- triedWithoutOnExpr = true
- } else {
- triedWithOnExpr = true
- }
+ if err := verifyColOperator(t, args); err != nil {
+ fmt.Printf("--- spillForced = %t join type = %s onExpr = %q"+
+ " q seed = %d run = %d ---\n",
+ spillForced, testSpec.joinType.String(), onExpr.Expr, seed, run)
+ fmt.Printf("--- lEqCols = %v rEqCols = %v ---\n", lEqCols, rEqCols)
+ prettyPrintTypes(lInputTypes, "left_table" /* tableName */)
+ prettyPrintTypes(rInputTypes, "right_table" /* tableName */)
+ prettyPrintInput(lRows, lInputTypes, "left_table" /* tableName */)
+ prettyPrintInput(rRows, rInputTypes, "right_table" /* tableName */)
+ t.Fatal(err)
+ }
+ if onExpr.Expr == "" {
+ triedWithoutOnExpr = true
+ } else {
+ triedWithOnExpr = true
}
}
}
@@ -824,134 +814,125 @@ func TestMergeJoinerAgainstProcessor(t *testing.T) {
for _, testSpec := range testSpecs {
for nCols := 1; nCols <= maxCols; nCols++ {
for nOrderingCols := 1; nOrderingCols <= nCols; nOrderingCols++ {
- for _, addFilter := range getAddFilterOptions(testSpec.joinType, nOrderingCols < nCols) {
- triedWithoutOnExpr, triedWithOnExpr := false, false
- if !testSpec.onExprSupported {
- triedWithOnExpr = true
- }
- for !triedWithoutOnExpr || !triedWithOnExpr {
- var (
- lRows, rRows rowenc.EncDatumRows
- lInputTypes, rInputTypes []*types.T
- lOrderingCols, rOrderingCols []execinfrapb.Ordering_Column
- usingRandomTypes bool
- )
- if rng.Float64() < randTypesProbability {
- lInputTypes = generateRandomSupportedTypes(rng, nCols)
- lOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
- rInputTypes = append(rInputTypes[:0], lInputTypes...)
- rOrderingCols = append(rOrderingCols[:0], lOrderingCols...)
- rng.Shuffle(nOrderingCols, func(i, j int) {
- iColIdx, jColIdx := rOrderingCols[i].ColIdx, rOrderingCols[j].ColIdx
- rInputTypes[iColIdx], rInputTypes[jColIdx] = rInputTypes[jColIdx], rInputTypes[iColIdx]
- rOrderingCols[i], rOrderingCols[j] = rOrderingCols[j], rOrderingCols[i]
- })
- rInputTypes = randomizeJoinRightTypes(rng, rInputTypes)
- lRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, lInputTypes)
- rRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, rInputTypes)
- usingRandomTypes = true
- } else {
- lInputTypes = intTyps[:nCols]
- rInputTypes = lInputTypes
- lRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
- rRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
- lOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
- rOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
- }
- // Set the directions of both columns to be the same.
- for i, lCol := range lOrderingCols {
- rOrderingCols[i].Direction = lCol.Direction
- }
-
- lMatchedCols := execinfrapb.ConvertToColumnOrdering(execinfrapb.Ordering{Columns: lOrderingCols})
- rMatchedCols := execinfrapb.ConvertToColumnOrdering(execinfrapb.Ordering{Columns: rOrderingCols})
- sort.Slice(lRows, func(i, j int) bool {
- cmp, err := lRows[i].Compare(lInputTypes, &da, lMatchedCols, &evalCtx, lRows[j])
- if err != nil {
- t.Fatal(err)
- }
- return cmp < 0
- })
- sort.Slice(rRows, func(i, j int) bool {
- cmp, err := rRows[i].Compare(rInputTypes, &da, rMatchedCols, &evalCtx, rRows[j])
- if err != nil {
- t.Fatal(err)
- }
- return cmp < 0
+ triedWithoutOnExpr, triedWithOnExpr := false, false
+ if !testSpec.onExprSupported {
+ triedWithOnExpr = true
+ }
+ for !triedWithoutOnExpr || !triedWithOnExpr {
+ var (
+ lRows, rRows rowenc.EncDatumRows
+ lInputTypes, rInputTypes []*types.T
+ lOrderingCols, rOrderingCols []execinfrapb.Ordering_Column
+ usingRandomTypes bool
+ )
+ if rng.Float64() < randTypesProbability {
+ lInputTypes = generateRandomSupportedTypes(rng, nCols)
+ lOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
+ rInputTypes = append(rInputTypes[:0], lInputTypes...)
+ rOrderingCols = append(rOrderingCols[:0], lOrderingCols...)
+ rng.Shuffle(nOrderingCols, func(i, j int) {
+ iColIdx, jColIdx := rOrderingCols[i].ColIdx, rOrderingCols[j].ColIdx
+ rInputTypes[iColIdx], rInputTypes[jColIdx] = rInputTypes[jColIdx], rInputTypes[iColIdx]
+ rOrderingCols[i], rOrderingCols[j] = rOrderingCols[j], rOrderingCols[i]
})
- var outputTypes []*types.T
- if testSpec.joinType.ShouldIncludeLeftColsInOutput() {
- outputTypes = append(outputTypes, lInputTypes...)
- }
- if testSpec.joinType.ShouldIncludeRightColsInOutput() {
- outputTypes = append(outputTypes, rInputTypes...)
- }
- outputColumns := make([]uint32, len(outputTypes))
- for i := range outputColumns {
- outputColumns[i] = uint32(i)
- }
+ rInputTypes = randomizeJoinRightTypes(rng, rInputTypes)
+ lRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, lInputTypes)
+ rRows = rowenc.RandEncDatumRowsOfTypes(rng, nRows, rInputTypes)
+ usingRandomTypes = true
+ } else {
+ lInputTypes = intTyps[:nCols]
+ rInputTypes = lInputTypes
+ lRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
+ rRows = rowenc.MakeRandIntRowsInRange(rng, nRows, nCols, maxNum, nullProbability)
+ lOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
+ rOrderingCols = generateColumnOrdering(rng, nCols, nOrderingCols)
+ }
+ // Set the directions of both columns to be the same.
+ for i, lCol := range lOrderingCols {
+ rOrderingCols[i].Direction = lCol.Direction
+ }
- var filter, onExpr execinfrapb.Expression
- if addFilter {
- forceSingleSide := !testSpec.joinType.ShouldIncludeLeftColsInOutput() ||
- !testSpec.joinType.ShouldIncludeRightColsInOutput()
- filter = generateFilterExpr(
- rng, nCols, nOrderingCols, outputTypes, usingRandomTypes, forceSingleSide,
- )
- }
- if triedWithoutOnExpr {
- colTypes := append(lInputTypes, rInputTypes...)
- onExpr = generateFilterExpr(
- rng, nCols, nOrderingCols, colTypes, usingRandomTypes, false, /* forceSingleSide */
- )
- }
- mjSpec := &execinfrapb.MergeJoinerSpec{
- OnExpr: onExpr,
- LeftOrdering: execinfrapb.Ordering{Columns: lOrderingCols},
- RightOrdering: execinfrapb.Ordering{Columns: rOrderingCols},
- Type: testSpec.joinType,
- NullEquality: testSpec.joinType.IsSetOpJoin(),
- }
- pspec := &execinfrapb.ProcessorSpec{
- Input: []execinfrapb.InputSyncSpec{{ColumnTypes: lInputTypes}, {ColumnTypes: rInputTypes}},
- Core: execinfrapb.ProcessorCoreUnion{MergeJoiner: mjSpec},
- Post: execinfrapb.PostProcessSpec{Projection: true, OutputColumns: outputColumns, Filter: filter},
- ResultTypes: outputTypes,
- }
- args := verifyColOperatorArgs{
- anyOrder: testSpec.anyOrder,
- inputTypes: [][]*types.T{lInputTypes, rInputTypes},
- inputs: []rowenc.EncDatumRows{lRows, rRows},
- pspec: pspec,
- rng: rng,
- }
- if testSpec.joinType.IsSetOpJoin() && nOrderingCols < nCols {
- // The output of set operation joins is not fully
- // deterministic when there are non-equality
- // columns, however, the rows must match on the
- // equality columns between vectorized and row
- // executions.
- args.colIdxsToCheckForEquality = make([]int, nOrderingCols)
- for i := range args.colIdxsToCheckForEquality {
- args.colIdxsToCheckForEquality[i] = int(lOrderingCols[i].ColIdx)
- }
+ lMatchedCols := execinfrapb.ConvertToColumnOrdering(execinfrapb.Ordering{Columns: lOrderingCols})
+ rMatchedCols := execinfrapb.ConvertToColumnOrdering(execinfrapb.Ordering{Columns: rOrderingCols})
+ sort.Slice(lRows, func(i, j int) bool {
+ cmp, err := lRows[i].Compare(lInputTypes, &da, lMatchedCols, &evalCtx, lRows[j])
+ if err != nil {
+ t.Fatal(err)
}
- if err := verifyColOperator(t, args); err != nil {
- fmt.Printf("--- join type = %s onExpr = %q filter = %q seed = %d run = %d ---\n",
- testSpec.joinType.String(), onExpr.Expr, filter.Expr, seed, run)
- fmt.Printf("--- left ordering = %v right ordering = %v ---\n", lOrderingCols, rOrderingCols)
- prettyPrintTypes(lInputTypes, "left_table" /* tableName */)
- prettyPrintTypes(rInputTypes, "right_table" /* tableName */)
- prettyPrintInput(lRows, lInputTypes, "left_table" /* tableName */)
- prettyPrintInput(rRows, rInputTypes, "right_table" /* tableName */)
+ return cmp < 0
+ })
+ sort.Slice(rRows, func(i, j int) bool {
+ cmp, err := rRows[i].Compare(rInputTypes, &da, rMatchedCols, &evalCtx, rRows[j])
+ if err != nil {
t.Fatal(err)
}
- if onExpr.Expr == "" {
- triedWithoutOnExpr = true
- } else {
- triedWithOnExpr = true
+ return cmp < 0
+ })
+ var outputTypes []*types.T
+ if testSpec.joinType.ShouldIncludeLeftColsInOutput() {
+ outputTypes = append(outputTypes, lInputTypes...)
+ }
+ if testSpec.joinType.ShouldIncludeRightColsInOutput() {
+ outputTypes = append(outputTypes, rInputTypes...)
+ }
+ outputColumns := make([]uint32, len(outputTypes))
+ for i := range outputColumns {
+ outputColumns[i] = uint32(i)
+ }
+
+ var onExpr execinfrapb.Expression
+ if triedWithoutOnExpr {
+ colTypes := append(lInputTypes, rInputTypes...)
+ onExpr = generateFilterExpr(
+ rng, nCols, nOrderingCols, colTypes, usingRandomTypes, false, /* forceSingleSide */
+ )
+ }
+ mjSpec := &execinfrapb.MergeJoinerSpec{
+ OnExpr: onExpr,
+ LeftOrdering: execinfrapb.Ordering{Columns: lOrderingCols},
+ RightOrdering: execinfrapb.Ordering{Columns: rOrderingCols},
+ Type: testSpec.joinType,
+ NullEquality: testSpec.joinType.IsSetOpJoin(),
+ }
+ pspec := &execinfrapb.ProcessorSpec{
+ Input: []execinfrapb.InputSyncSpec{{ColumnTypes: lInputTypes}, {ColumnTypes: rInputTypes}},
+ Core: execinfrapb.ProcessorCoreUnion{MergeJoiner: mjSpec},
+ Post: execinfrapb.PostProcessSpec{Projection: true, OutputColumns: outputColumns},
+ ResultTypes: outputTypes,
+ }
+ args := verifyColOperatorArgs{
+ anyOrder: testSpec.anyOrder,
+ inputTypes: [][]*types.T{lInputTypes, rInputTypes},
+ inputs: []rowenc.EncDatumRows{lRows, rRows},
+ pspec: pspec,
+ rng: rng,
+ }
+ if testSpec.joinType.IsSetOpJoin() && nOrderingCols < nCols {
+ // The output of set operation joins is not fully
+ // deterministic when there are non-equality
+ // columns, however, the rows must match on the
+ // equality columns between vectorized and row
+ // executions.
+ args.colIdxsToCheckForEquality = make([]int, nOrderingCols)
+ for i := range args.colIdxsToCheckForEquality {
+ args.colIdxsToCheckForEquality[i] = int(lOrderingCols[i].ColIdx)
}
}
+ if err := verifyColOperator(t, args); err != nil {
+ fmt.Printf("--- join type = %s onExpr = %q seed = %d run = %d ---\n",
+ testSpec.joinType.String(), onExpr.Expr, seed, run)
+ fmt.Printf("--- left ordering = %v right ordering = %v ---\n", lOrderingCols, rOrderingCols)
+ prettyPrintTypes(lInputTypes, "left_table" /* tableName */)
+ prettyPrintTypes(rInputTypes, "right_table" /* tableName */)
+ prettyPrintInput(lRows, lInputTypes, "left_table" /* tableName */)
+ prettyPrintInput(rRows, rInputTypes, "right_table" /* tableName */)
+ t.Fatal(err)
+ }
+ if onExpr.Expr == "" {
+ triedWithoutOnExpr = true
+ } else {
+ triedWithOnExpr = true
+ }
}
}
}
@@ -979,16 +960,6 @@ func generateColumnOrdering(
return orderingCols
}
-func getAddFilterOptions(joinType descpb.JoinType, nonEqualityColsPresent bool) []bool {
- if joinType.IsSetOpJoin() && nonEqualityColsPresent {
- // Output of set operation join when rows have non equality columns is
- // not deterministic, so applying a filter on top of it can produce
- // arbitrary results, and we skip such configuration.
- return []bool{false}
- }
- return []bool{false, true}
-}
-
// generateFilterExpr populates an execinfrapb.Expression that contains a
// single comparison which can be either comparing a column from the left
// against a column from the right or comparing a column from either side
diff --git a/pkg/sql/execinfra/processorsbase.go b/pkg/sql/execinfra/processorsbase.go
index 0ec8762e6574..8f3c016fab91 100644
--- a/pkg/sql/execinfra/processorsbase.go
+++ b/pkg/sql/execinfra/processorsbase.go
@@ -60,9 +60,6 @@ type ProcOutputHelper struct {
// post-processed row directly.
output RowReceiver
RowAlloc rowenc.EncDatumRowAlloc
- // filter is an optional filter that determines whether a single row is
- // output or not.
- filter *execinfrapb.ExprHelper
// renderExprs has length > 0 if we have a rendering. Only one of renderExprs
// and outputCols can be set.
renderExprs []execinfrapb.ExprHelper
@@ -120,12 +117,6 @@ func (h *ProcOutputHelper) Init(
}
h.output = output
h.numInternalCols = len(coreOutputTypes)
- if post.Filter != (execinfrapb.Expression{}) {
- h.filter = &execinfrapb.ExprHelper{}
- if err := h.filter.Init(post.Filter, coreOutputTypes, semaCtx, evalCtx); err != nil {
- return err
- }
- }
if post.Projection {
for _, col := range post.OutputColumns {
if int(col) >= h.numInternalCols {
@@ -203,12 +194,6 @@ func (h *ProcOutputHelper) NeededColumns() (colIdxs util.FastIntSet) {
}
for i := 0; i < h.numInternalCols; i++ {
- // See if filter requires this column.
- if h.filter != nil && h.filter.Vars.IndexedVarUsed(i) {
- colIdxs.Add(i)
- continue
- }
-
// See if render expressions require this column.
for j := range h.renderExprs {
if h.renderExprs[j].Vars.IndexedVarUsed(i) {
@@ -285,19 +270,6 @@ func (h *ProcOutputHelper) ProcessRow(
return nil, false, nil
}
- if h.filter != nil {
- // Filtering.
- passes, err := h.filter.EvalFilter(row)
- if err != nil {
- return nil, false, err
- }
- if !passes {
- if log.V(4) {
- log.Infof(ctx, "filtered out row %s", row.String(h.filter.Types))
- }
- return nil, true, nil
- }
- }
h.rowIdx++
if h.rowIdx <= h.offset {
// Suppress row.
diff --git a/pkg/sql/execinfra/readerbase.go b/pkg/sql/execinfra/readerbase.go
index b3e7999b571d..06c99f776a6a 100644
--- a/pkg/sql/execinfra/readerbase.go
+++ b/pkg/sql/execinfra/readerbase.go
@@ -53,11 +53,6 @@ func LimitHint(specLimitHint int64, post *execinfrapb.PostProcessSpec) (limitHin
limitHint = specLimitHint + RowChannelBufSize + 1
}
- if !post.Filter.Empty() {
- // We have a filter so we will likely need to read more rows.
- limitHint *= 2
- }
-
return limitHint
}
diff --git a/pkg/sql/execinfra/version.go b/pkg/sql/execinfra/version.go
index 7b67c3a17b93..db428cfbf876 100644
--- a/pkg/sql/execinfra/version.go
+++ b/pkg/sql/execinfra/version.go
@@ -39,11 +39,11 @@ import "github.com/cockroachdb/cockroach/pkg/sql/execinfrapb"
//
// ATTENTION: When updating these fields, add a brief description of what
// changed to the version history below.
-const Version execinfrapb.DistSQLVersion = 42
+const Version execinfrapb.DistSQLVersion = 43
// MinAcceptedVersion is the oldest version that the server is compatible with.
// A server will not accept flows with older versions.
-const MinAcceptedVersion execinfrapb.DistSQLVersion = 42
+const MinAcceptedVersion execinfrapb.DistSQLVersion = 43
/*
@@ -51,6 +51,10 @@ const MinAcceptedVersion execinfrapb.DistSQLVersion = 42
Please add new entries at the top.
+- Version: 43 (MinAcceptedVersion: 43)
+ - Filter was removed from PostProcessSpec and a new Filterer processor was
+ added.
+
- Version: 42 (MinAcceptedVersion: 42)
- A new field NeededColumns is added to TableReaderSpec which is now required
by the vectorized ColBatchScans to be set up.
diff --git a/pkg/sql/execinfrapb/flow_diagram.go b/pkg/sql/execinfrapb/flow_diagram.go
index 4f30517a6f43..814d4c9ac473 100644
--- a/pkg/sql/execinfrapb/flow_diagram.go
+++ b/pkg/sql/execinfrapb/flow_diagram.go
@@ -69,6 +69,13 @@ func (*NoopCoreSpec) summary() (string, []string) {
return "No-op", []string{}
}
+// summary implements the diagramCellType interface.
+func (f *FiltererSpec) summary() (string, []string) {
+ return "Filterer", []string{
+ fmt.Sprintf("Filter: %s", f.Filter),
+ }
+}
+
// summary implements the diagramCellType interface.
func (mts *MetadataTestSenderSpec) summary() (string, []string) {
return "MetadataTestSender", []string{mts.ID}
@@ -423,9 +430,6 @@ func (post *PostProcessSpec) summary() []string {
// (namely InterleavedReaderJoiner) that have multiple PostProcessors.
func (post *PostProcessSpec) summaryWithPrefix(prefix string) []string {
var res []string
- if !post.Filter.Empty() {
- res = append(res, fmt.Sprintf("%sFilter: %s", prefix, post.Filter))
- }
if post.Projection {
outputColumns := "None"
if len(post.OutputColumns) > 0 {
diff --git a/pkg/sql/execinfrapb/flow_diagram_test.go b/pkg/sql/execinfrapb/flow_diagram_test.go
index 5a03be98cea1..394daf7827fd 100644
--- a/pkg/sql/execinfrapb/flow_diagram_test.go
+++ b/pkg/sql/execinfrapb/flow_diagram_test.go
@@ -122,7 +122,6 @@ func TestPlanDiagramIndexJoin(t *testing.T) {
}},
Core: ProcessorCoreUnion{JoinReader: &JoinReaderSpec{Table: *desc}},
Post: PostProcessSpec{
- Filter: Expression{Expr: "@1+@2<@3"},
Projection: true,
OutputColumns: []uint32{2},
},
@@ -149,7 +148,7 @@ func TestPlanDiagramIndexJoin(t *testing.T) {
{"nodeIdx":0,"inputs":[],"core":{"title":"TableReader/0","details":["Table@SomeIndex","Out: @1,@2"]},"outputs":[],"stage":1},
{"nodeIdx":1,"inputs":[],"core":{"title":"TableReader/1","details":["Table@SomeIndex","Out: @1,@2"]},"outputs":[],"stage":1},
{"nodeIdx":2,"inputs":[],"core":{"title":"TableReader/2","details":["Table@SomeIndex","Out: @1,@2"]},"outputs":[],"stage":1},
- {"nodeIdx":2,"inputs":[{"title":"ordered","details":["@2+"]}],"core":{"title":"JoinReader/3","details":["Table@primary","Filter: @1+@2\u003c@3","Out: @3"]},"outputs":[],"stage":2},
+ {"nodeIdx":2,"inputs":[{"title":"ordered","details":["@2+"]}],"core":{"title":"JoinReader/3","details":["Table@primary","Out: @3"]},"outputs":[],"stage":2},
{"nodeIdx":2,"inputs":[],"core":{"title":"Response","details":[]},"outputs":[]}
],
"edges":[
@@ -163,7 +162,7 @@ func TestPlanDiagramIndexJoin(t *testing.T) {
compareDiagrams(t, json, expected)
- expectedURL := "https://cockroachdb.github.io/distsqlplan/decode.html#eJy0ksFLwzAUxu_-FeO77oFt4imnXiZO1OnmTXuozWMUuqQmKUxG_3dpKm6DTSbTY_L1e79fH9nAv9dQWMzuJ6PF093oZjKfgGCs5odixR7qBSkIAgSJnNA4W7L31vXRJn441WuohFCZpg39dU4orWOoDUIVaobCc_FW85wLze4yAUFzKKo6jo9RtrArnhrNaxBmbVCjLKVMIO8Itg3bwT4US4ZKO9qBp6fD0z-Hi9Ph4l_hW6Z1mh3rfVomxsi7A4a3tjJfgvKQYOOqVeE-QLiu6sCuNxxn4rVNEllm8ltbHnUWv1nYnH1jjec9lWOTk_6HWC95WIC3rSv50dkyvsjhOIu9eKHZhyGVw2FqYhSXultOzymLc8ryx_LVXjnp8u7iMwAA__-WuTh_"
+ expectedURL := "https://cockroachdb.github.io/distsqlplan/decode.html#eJy0ksFq8zAQhO__U4S5_oJack86-RJoStu0cW_FB9VagsGWXEmGFON3L5ZLE0NSUtIed8cz33hRD_9WQyJf3y8X-dPd4ma5WYLBWE0PqiEP-QIOBgGGFAVD62xJ3ls3Sn38cKV3kAlDZdoujOuCobSOIHuEKtQEiWf1WtOGlCZ3lYBBU1BVHeOjlOW2oZXRtAPDugtykXGWCRQDg-3CPtgHtSVIPrADOD8fzn8dLs6Hiz-F75nWaXKk57RM_EcxHGl4ayvzWTA9VrB1VaPc-1e99GQ38ZPDbMi31niaIU8lJ2Nx0luaftTbzpX06GwZX940rqMvLjT5MKnpNKxMlOLxDs38ErO4xJx-a76emZOhGP59BAAA___j2TIH"
if url.String() != expectedURL {
t.Errorf("expected `%s` got `%s`", expectedURL, url.String())
}
diff --git a/pkg/sql/execinfrapb/processors.pb.go b/pkg/sql/execinfrapb/processors.pb.go
index e36323a2952a..02b50a6fee55 100644
--- a/pkg/sql/execinfrapb/processors.pb.go
+++ b/pkg/sql/execinfrapb/processors.pb.go
@@ -77,7 +77,7 @@ func (m *ProcessorSpec) Reset() { *m = ProcessorSpec{} }
func (m *ProcessorSpec) String() string { return proto.CompactTextString(m) }
func (*ProcessorSpec) ProtoMessage() {}
func (*ProcessorSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{0}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{0}
}
func (m *ProcessorSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -132,13 +132,14 @@ type ProcessorCoreUnion struct {
BackupData *BackupDataSpec `protobuf:"bytes,31,opt,name=backupData" json:"backupData,omitempty"`
SplitAndScatter *SplitAndScatterSpec `protobuf:"bytes,32,opt,name=splitAndScatter" json:"splitAndScatter,omitempty"`
RestoreData *RestoreDataSpec `protobuf:"bytes,33,opt,name=restoreData" json:"restoreData,omitempty"`
+ Filterer *FiltererSpec `protobuf:"bytes,34,opt,name=filterer" json:"filterer,omitempty"`
}
func (m *ProcessorCoreUnion) Reset() { *m = ProcessorCoreUnion{} }
func (m *ProcessorCoreUnion) String() string { return proto.CompactTextString(m) }
func (*ProcessorCoreUnion) ProtoMessage() {}
func (*ProcessorCoreUnion) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{1}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{1}
}
func (m *ProcessorCoreUnion) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -173,7 +174,7 @@ func (m *NoopCoreSpec) Reset() { *m = NoopCoreSpec{} }
func (m *NoopCoreSpec) String() string { return proto.CompactTextString(m) }
func (*NoopCoreSpec) ProtoMessage() {}
func (*NoopCoreSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{2}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{2}
}
func (m *NoopCoreSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -215,7 +216,7 @@ func (m *LocalPlanNodeSpec) Reset() { *m = LocalPlanNodeSpec{} }
func (m *LocalPlanNodeSpec) String() string { return proto.CompactTextString(m) }
func (*LocalPlanNodeSpec) ProtoMessage() {}
func (*LocalPlanNodeSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{3}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{3}
}
func (m *LocalPlanNodeSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -248,7 +249,7 @@ func (m *MetadataTestSenderSpec) Reset() { *m = MetadataTestSenderSpec{}
func (m *MetadataTestSenderSpec) String() string { return proto.CompactTextString(m) }
func (*MetadataTestSenderSpec) ProtoMessage() {}
func (*MetadataTestSenderSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{4}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{4}
}
func (m *MetadataTestSenderSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -281,7 +282,7 @@ func (m *MetadataTestReceiverSpec) Reset() { *m = MetadataTestReceiverSp
func (m *MetadataTestReceiverSpec) String() string { return proto.CompactTextString(m) }
func (*MetadataTestReceiverSpec) ProtoMessage() {}
func (*MetadataTestReceiverSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_a53488b37b6ed0c8, []int{5}
+ return fileDescriptor_processors_7bc79cdd8886d88f, []int{5}
}
func (m *MetadataTestReceiverSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -729,6 +730,18 @@ func (m *ProcessorCoreUnion) MarshalTo(dAtA []byte) (int, error) {
}
i += n31
}
+ if m.Filterer != nil {
+ dAtA[i] = 0x92
+ i++
+ dAtA[i] = 0x2
+ i++
+ i = encodeVarintProcessors(dAtA, i, uint64(m.Filterer.Size()))
+ n32, err := m.Filterer.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n32
+ }
return i, nil
}
@@ -997,6 +1010,10 @@ func (m *ProcessorCoreUnion) Size() (n int) {
l = m.RestoreData.Size()
n += 2 + l + sovProcessors(uint64(l))
}
+ if m.Filterer != nil {
+ l = m.Filterer.Size()
+ n += 2 + l + sovProcessors(uint64(l))
+ }
return n
}
@@ -1149,6 +1166,9 @@ func (this *ProcessorCoreUnion) GetValue() interface{} {
if this.RestoreData != nil {
return this.RestoreData
}
+ if this.Filterer != nil {
+ return this.Filterer
+ }
return nil
}
@@ -1212,6 +1232,8 @@ func (this *ProcessorCoreUnion) SetValue(value interface{}) bool {
this.SplitAndScatter = vt
case *RestoreDataSpec:
this.RestoreData = vt
+ case *FiltererSpec:
+ this.Filterer = vt
default:
return false
}
@@ -2444,6 +2466,39 @@ func (m *ProcessorCoreUnion) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 34:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filterer", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowProcessors
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthProcessors
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Filterer == nil {
+ m.Filterer = &FiltererSpec{}
+ }
+ if err := m.Filterer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipProcessors(dAtA[iNdEx:])
@@ -2896,16 +2951,16 @@ var (
)
func init() {
- proto.RegisterFile("sql/execinfrapb/processors.proto", fileDescriptor_processors_a53488b37b6ed0c8)
+ proto.RegisterFile("sql/execinfrapb/processors.proto", fileDescriptor_processors_7bc79cdd8886d88f)
}
-var fileDescriptor_processors_a53488b37b6ed0c8 = []byte{
- // 1201 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_processors_7bc79cdd8886d88f = []byte{
+ // 1214 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x97, 0xd1, 0x52, 0x1b, 0x37,
0x14, 0x86, 0x31, 0x18, 0x6c, 0xcb, 0x36, 0x38, 0x0a, 0x49, 0x55, 0xb7, 0x35, 0xd4, 0x93, 0xb4,
0x6e, 0x4a, 0x4c, 0x87, 0xe9, 0xf4, 0x22, 0xd3, 0x4e, 0x1b, 0xdb, 0x65, 0x58, 0x9a, 0x12, 0xba,
0xa6, 0x61, 0x86, 0x1b, 0x57, 0xec, 0x0a, 0xb3, 0x61, 0xbd, 0x5a, 0x24, 0x19, 0x42, 0xfa, 0x12,
- 0x9d, 0x3e, 0x41, 0x1f, 0x87, 0xab, 0x4e, 0x2e, 0x73, 0xc5, 0xb4, 0xe6, 0x45, 0x32, 0x92, 0xd6,
+ 0x7d, 0x84, 0x3e, 0x0e, 0x57, 0x9d, 0x5c, 0x75, 0x72, 0xc5, 0xb4, 0xe6, 0x45, 0x32, 0x92, 0xd6,
0xbb, 0x6b, 0x83, 0xbd, 0xdc, 0x30, 0xb6, 0xfc, 0xff, 0x9f, 0x8e, 0x8e, 0x8e, 0xa4, 0x03, 0x58,
0xe5, 0xa7, 0xee, 0x3a, 0x79, 0x43, 0x2c, 0xc7, 0x3b, 0x62, 0xd8, 0x3f, 0x5c, 0xf7, 0x19, 0xb5,
0x08, 0xe7, 0x94, 0xf1, 0xba, 0xcf, 0xa8, 0xa0, 0x10, 0x59, 0xd4, 0x3a, 0x61, 0x14, 0x5b, 0xc7,
@@ -2914,7 +2969,7 @@ var fileDescriptor_processors_a53488b37b6ed0c8 = []byte{
0x9c, 0x4d, 0xab, 0x6a, 0xd3, 0x60, 0x7d, 0xf7, 0xa4, 0xe3, 0xd0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d7, 0x95, 0x99, 0x83, 0x7c, 0xec, 0xff, 0x95,
+ 0x0f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x05, 0xbc, 0xaf, 0x7b, 0xbe, 0x0d, 0x00, 0x00,
}
diff --git a/pkg/sql/execinfrapb/processors.proto b/pkg/sql/execinfrapb/processors.proto
index 1525bb068e5a..286bdaedaf1e 100644
--- a/pkg/sql/execinfrapb/processors.proto
+++ b/pkg/sql/execinfrapb/processors.proto
@@ -116,6 +116,7 @@ message ProcessorCoreUnion {
optional BackupDataSpec backupData = 31;
optional SplitAndScatterSpec splitAndScatter = 32;
optional RestoreDataSpec restoreData = 33;
+ optional FiltererSpec filterer = 34;
reserved 6, 12;
}
diff --git a/pkg/sql/execinfrapb/processors_base.pb.go b/pkg/sql/execinfrapb/processors_base.pb.go
index fa88bade0a13..f53b880aa7c2 100644
--- a/pkg/sql/execinfrapb/processors_base.pb.go
+++ b/pkg/sql/execinfrapb/processors_base.pb.go
@@ -27,13 +27,10 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-// PostProcessSpec describes the processing required to obtain the output
-// (filtering, projection). It operates on the internal schema of the processor
-// (see ProcessorSpec).
+// PostProcessSpec describes the processing required to obtain the output (e.g.
+// projection). It operates on the internal schema of the processor (see
+// ProcessorSpec).
type PostProcessSpec struct {
- // A filtering expression which references the internal columns of the
- // processor via ordinal references (@1, @2, etc).
- Filter Expression `protobuf:"bytes,1,opt,name=filter" json:"filter"`
// If true, output_columns describes a projection. Used to differentiate
// between an empty projection and no projection.
//
@@ -61,7 +58,7 @@ func (m *PostProcessSpec) Reset() { *m = PostProcessSpec{} }
func (m *PostProcessSpec) String() string { return proto.CompactTextString(m) }
func (*PostProcessSpec) ProtoMessage() {}
func (*PostProcessSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_base_77125fa0b0ed50f0, []int{0}
+ return fileDescriptor_processors_base_2f9dd97fffc5def6, []int{0}
}
func (m *PostProcessSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -94,7 +91,7 @@ func (m *Columns) Reset() { *m = Columns{} }
func (m *Columns) String() string { return proto.CompactTextString(m) }
func (*Columns) ProtoMessage() {}
func (*Columns) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_base_77125fa0b0ed50f0, []int{1}
+ return fileDescriptor_processors_base_2f9dd97fffc5def6, []int{1}
}
func (m *Columns) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -130,7 +127,7 @@ func (m *TableReaderSpan) Reset() { *m = TableReaderSpan{} }
func (m *TableReaderSpan) String() string { return proto.CompactTextString(m) }
func (*TableReaderSpan) ProtoMessage() {}
func (*TableReaderSpan) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_base_77125fa0b0ed50f0, []int{2}
+ return fileDescriptor_processors_base_2f9dd97fffc5def6, []int{2}
}
func (m *TableReaderSpan) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -175,14 +172,6 @@ func (m *PostProcessSpec) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
- dAtA[i] = 0xa
- i++
- i = encodeVarintProcessorsBase(dAtA, i, uint64(m.Filter.Size()))
- n1, err := m.Filter.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
dAtA[i] = 0x10
i++
if m.Projection {
@@ -192,21 +181,21 @@ func (m *PostProcessSpec) MarshalTo(dAtA []byte) (int, error) {
}
i++
if len(m.OutputColumns) > 0 {
- dAtA3 := make([]byte, len(m.OutputColumns)*10)
- var j2 int
+ dAtA2 := make([]byte, len(m.OutputColumns)*10)
+ var j1 int
for _, num := range m.OutputColumns {
for num >= 1<<7 {
- dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j2++
+ j1++
}
- dAtA3[j2] = uint8(num)
- j2++
+ dAtA2[j1] = uint8(num)
+ j1++
}
dAtA[i] = 0x1a
i++
- i = encodeVarintProcessorsBase(dAtA, i, uint64(j2))
- i += copy(dAtA[i:], dAtA3[:j2])
+ i = encodeVarintProcessorsBase(dAtA, i, uint64(j1))
+ i += copy(dAtA[i:], dAtA2[:j1])
}
if len(m.RenderExprs) > 0 {
for _, msg := range m.RenderExprs {
@@ -245,21 +234,21 @@ func (m *Columns) MarshalTo(dAtA []byte) (int, error) {
var l int
_ = l
if len(m.Columns) > 0 {
- dAtA5 := make([]byte, len(m.Columns)*10)
- var j4 int
+ dAtA4 := make([]byte, len(m.Columns)*10)
+ var j3 int
for _, num := range m.Columns {
for num >= 1<<7 {
- dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j4++
+ j3++
}
- dAtA5[j4] = uint8(num)
- j4++
+ dAtA4[j3] = uint8(num)
+ j3++
}
dAtA[i] = 0xa
i++
- i = encodeVarintProcessorsBase(dAtA, i, uint64(j4))
- i += copy(dAtA[i:], dAtA5[:j4])
+ i = encodeVarintProcessorsBase(dAtA, i, uint64(j3))
+ i += copy(dAtA[i:], dAtA4[:j3])
}
return i, nil
}
@@ -282,11 +271,11 @@ func (m *TableReaderSpan) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsBase(dAtA, i, uint64(m.Span.Size()))
- n6, err := m.Span.MarshalTo(dAtA[i:])
+ n5, err := m.Span.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n6
+ i += n5
return i, nil
}
@@ -305,8 +294,6 @@ func (m *PostProcessSpec) Size() (n int) {
}
var l int
_ = l
- l = m.Filter.Size()
- n += 1 + l + sovProcessorsBase(uint64(l))
n += 2
if len(m.OutputColumns) > 0 {
l = 0
@@ -395,36 +382,6 @@ func (m *PostProcessSpec) Unmarshal(dAtA []byte) error {
return fmt.Errorf("proto: PostProcessSpec: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowProcessorsBase
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthProcessorsBase
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Projection", wireType)
@@ -917,33 +874,33 @@ var (
)
func init() {
- proto.RegisterFile("sql/execinfrapb/processors_base.proto", fileDescriptor_processors_base_77125fa0b0ed50f0)
+ proto.RegisterFile("sql/execinfrapb/processors_base.proto", fileDescriptor_processors_base_2f9dd97fffc5def6)
}
-var fileDescriptor_processors_base_77125fa0b0ed50f0 = []byte{
- // 376 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x41, 0xae, 0xd3, 0x30,
- 0x10, 0x86, 0xe3, 0x36, 0xaf, 0x0f, 0xb9, 0x3c, 0x8a, 0x2c, 0x24, 0xa2, 0xa8, 0x32, 0x51, 0x55,
- 0x44, 0x58, 0x90, 0x0a, 0x8e, 0x10, 0x60, 0x89, 0x54, 0xb5, 0xac, 0xd8, 0x54, 0xae, 0xe3, 0x94,
- 0x40, 0x6a, 0xbb, 0x1e, 0x47, 0xea, 0x31, 0xb8, 0x09, 0xd7, 0xe8, 0xb2, 0xcb, 0xae, 0x10, 0xa4,
- 0x17, 0x41, 0xad, 0x13, 0x14, 0x90, 0x58, 0xbc, 0xdd, 0xe8, 0x9b, 0xf9, 0x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- 0x85, 0x03, 0x19, 0xe3, 0x81, 0xca, 0x73, 0x10, 0x36, 0xb8, 0x89, 0x50, 0xec, 0xb7, 0xf6, 0x8e,
- 0x91, 0x10, 0xdf, 0x94, 0xc5, 0xb6, 0xb0, 0xc1, 0xa0, 0xd3, 0x74, 0x68, 0xf2, 0x02, 0xdf, 0xb6,
- 0x4e, 0x63, 0x7c, 0xdb, 0x7a, 0xa3, 0x3f, 0xde, 0x2d, 0x9a, 0xbc, 0xc3, 0xa3, 0x8f, 0x6c, 0x5d,
- 0x8a, 0x85, 0x60, 0x99, 0x30, 0x4b, 0xcd, 0x24, 0x79, 0x8d, 0x7d, 0xd0, 0x4c, 0x36, 0xf7, 0xfa,
- 0xb4, 0x23, 0xdf, 0x3c, 0x58, 0x72, 0x19, 0x6b, 0xf6, 0x5d, 0x47, 0xd3, 0x57, 0x87, 0x5f, 0xd4,
- 0x3b, 0xd4, 0x14, 0x1d, 0x6b, 0x8a, 0x4e, 0x35, 0x45, 0x3f, 0x6b, 0x8a, 0xbe, 0x9d, 0xa9, 0x77,
- 0x3c, 0x53, 0xef, 0x74, 0xa6, 0xde, 0xa7, 0x61, 0xe7, 0x13, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff,
- 0x6d, 0xe2, 0x8a, 0x1e, 0x57, 0x02, 0x00, 0x00,
+var fileDescriptor_processors_base_2f9dd97fffc5def6 = []byte{
+ // 370 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcf, 0xce, 0xd2, 0x40,
+ 0x14, 0xc5, 0x3b, 0x50, 0xfe, 0x64, 0x2a, 0x42, 0x26, 0x26, 0x36, 0x0d, 0x19, 0x1b, 0x82, 0xb1,
+ 0x2e, 0x2c, 0x91, 0x47, 0x40, 0xdd, 0x98, 0x98, 0x10, 0x70, 0xe5, 0x86, 0x0c, 0xd3, 0x01, 0xab,
+ 0x65, 0x66, 0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xd8, 0x6d, 0xf1, 0x87, 0x83, 0x36, 0x02, 0x20, 0x55, 0xb2, 0x0a, 0xf6, 0x4a,
+ 0xff, 0x95, 0x03, 0x19, 0xe2, 0xb6, 0xda, 0x6c, 0x40, 0x58, 0xbf, 0x15, 0xa2, 0xc8, 0xad, 0x24,
+ 0x15, 0x23, 0x01, 0x6e, 0x65, 0xe9, 0x2e, 0xb5, 0x7e, 0xbb, 0xb6, 0x2c, 0xd1, 0x47, 0xb7, 0x8b,
+ 0x06, 0x8d, 0xd1, 0x2b, 0xdc, 0xb9, 0x37, 0x1b, 0xe2, 0xce, 0xbd, 0x3d, 0xfa, 0xd7, 0xfe, 0x8e,
+ 0x46, 0xef, 0x71, 0xff, 0x33, 0x5b, 0x67, 0x62, 0x21, 0x58, 0x22, 0xcc, 0x52, 0x33, 0x49, 0xde,
+ 0x62, 0x17, 0x34, 0x93, 0x3e, 0x0a, 0x51, 0xe4, 0x4d, 0x9f, 0xd7, 0x4e, 0xa8, 0x7e, 0x79, 0x7c,
+ 0x95, 0x55, 0xa9, 0x37, 0xe9, 0xec, 0xcd, 0xf1, 0x37, 0x75, 0x8e, 0x05, 0x45, 0xa7, 0x82, 0xa2,
+ 0x73, 0x41, 0xd1, 0xaf, 0x82, 0xa2, 0x1f, 0x17, 0xea, 0x9c, 0x2e, 0xd4, 0x39, 0x5f, 0xa8, 0xf3,
+ 0xc5, 0xab, 0x3d, 0xe3, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xd4, 0xc6, 0xca, 0x19, 0x02,
+ 0x00, 0x00,
}
diff --git a/pkg/sql/execinfrapb/processors_base.proto b/pkg/sql/execinfrapb/processors_base.proto
index 092e06bf6066..a11766ad5606 100644
--- a/pkg/sql/execinfrapb/processors_base.proto
+++ b/pkg/sql/execinfrapb/processors_base.proto
@@ -23,14 +23,10 @@ import "sql/execinfrapb/data.proto";
import "roachpb/data.proto";
import "gogoproto/gogo.proto";
-// PostProcessSpec describes the processing required to obtain the output
-// (filtering, projection). It operates on the internal schema of the processor
-// (see ProcessorSpec).
+// PostProcessSpec describes the processing required to obtain the output (e.g.
+// projection). It operates on the internal schema of the processor (see
+// ProcessorSpec).
message PostProcessSpec {
- // A filtering expression which references the internal columns of the
- // processor via ordinal references (@1, @2, etc).
- optional Expression filter = 1 [(gogoproto.nullable) = false];
-
// If true, output_columns describes a projection. Used to differentiate
// between an empty projection and no projection.
//
@@ -56,6 +52,8 @@ message PostProcessSpec {
// If nonzero, the processor will stop after emitting this many rows. The rows
// suppressed by , if any, do not count towards this limit.
optional uint64 limit = 6 [(gogoproto.nullable) = false];
+
+ reserved 1;
}
message Columns {
diff --git a/pkg/sql/execinfrapb/processors_sql.pb.go b/pkg/sql/execinfrapb/processors_sql.pb.go
index fe348b69b51a..022578efa729 100644
--- a/pkg/sql/execinfrapb/processors_sql.pb.go
+++ b/pkg/sql/execinfrapb/processors_sql.pb.go
@@ -64,7 +64,7 @@ func (x *ScanVisibility) UnmarshalJSON(data []byte) error {
return nil
}
func (ScanVisibility) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{0}
}
// These mirror the aggregate functions supported by sql/parser. See
@@ -226,7 +226,7 @@ func (x *AggregatorSpec_Func) UnmarshalJSON(data []byte) error {
return nil
}
func (AggregatorSpec_Func) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{12, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{13, 0}
}
type AggregatorSpec_Type int32
@@ -272,7 +272,7 @@ func (x *AggregatorSpec_Type) UnmarshalJSON(data []byte) error {
return nil
}
func (AggregatorSpec_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{12, 1}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{13, 1}
}
type WindowerSpec_WindowFunc int32
@@ -336,7 +336,7 @@ func (x *WindowerSpec_WindowFunc) UnmarshalJSON(data []byte) error {
return nil
}
func (WindowerSpec_WindowFunc) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 0}
}
// Mode indicates which mode of framing is used.
@@ -380,7 +380,7 @@ func (x *WindowerSpec_Frame_Mode) UnmarshalJSON(data []byte) error {
return nil
}
func (WindowerSpec_Frame_Mode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1, 0}
}
// BoundType indicates which type of boundary is used.
@@ -427,7 +427,7 @@ func (x *WindowerSpec_Frame_BoundType) UnmarshalJSON(data []byte) error {
return nil
}
func (WindowerSpec_Frame_BoundType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1, 1}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1, 1}
}
// Exclusion specifies the type of frame exclusion.
@@ -470,7 +470,7 @@ func (x *WindowerSpec_Frame_Exclusion) UnmarshalJSON(data []byte) error {
return nil
}
func (WindowerSpec_Frame_Exclusion) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1, 2}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1, 2}
}
// ValuesCoreSpec is the core of a processor that has no inputs and generates
@@ -490,7 +490,7 @@ func (m *ValuesCoreSpec) Reset() { *m = ValuesCoreSpec{} }
func (m *ValuesCoreSpec) String() string { return proto.CompactTextString(m) }
func (*ValuesCoreSpec) ProtoMessage() {}
func (*ValuesCoreSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{0}
}
func (m *ValuesCoreSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -600,7 +600,7 @@ func (m *TableReaderSpec) Reset() { *m = TableReaderSpec{} }
func (m *TableReaderSpec) String() string { return proto.CompactTextString(m) }
func (*TableReaderSpec) ProtoMessage() {}
func (*TableReaderSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{1}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{1}
}
func (m *TableReaderSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -625,6 +625,43 @@ func (m *TableReaderSpec) XXX_DiscardUnknown() {
var xxx_messageInfo_TableReaderSpec proto.InternalMessageInfo
+// FiltererSpec is the specification for a processor that filters input rows
+// according to a boolean expression.
+type FiltererSpec struct {
+ // A filtering expression which references the internal columns of the
+ // processor via ordinal references (@1, @2, etc).
+ Filter Expression `protobuf:"bytes,1,opt,name=filter" json:"filter"`
+}
+
+func (m *FiltererSpec) Reset() { *m = FiltererSpec{} }
+func (m *FiltererSpec) String() string { return proto.CompactTextString(m) }
+func (*FiltererSpec) ProtoMessage() {}
+func (*FiltererSpec) Descriptor() ([]byte, []int) {
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{2}
+}
+func (m *FiltererSpec) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *FiltererSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+}
+func (dst *FiltererSpec) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FiltererSpec.Merge(dst, src)
+}
+func (m *FiltererSpec) XXX_Size() int {
+ return m.Size()
+}
+func (m *FiltererSpec) XXX_DiscardUnknown() {
+ xxx_messageInfo_FiltererSpec.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FiltererSpec proto.InternalMessageInfo
+
// IndexSkipTableReaderSpec is the specification for a table reader that
// is performing a loose index scan over rows in the table. This means that
// this reader will return distinct rows from the table while using the index
@@ -655,7 +692,7 @@ func (m *IndexSkipTableReaderSpec) Reset() { *m = IndexSkipTableReaderSp
func (m *IndexSkipTableReaderSpec) String() string { return proto.CompactTextString(m) }
func (*IndexSkipTableReaderSpec) ProtoMessage() {}
func (*IndexSkipTableReaderSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{2}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{3}
}
func (m *IndexSkipTableReaderSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -826,7 +863,7 @@ func (m *JoinReaderSpec) Reset() { *m = JoinReaderSpec{} }
func (m *JoinReaderSpec) String() string { return proto.CompactTextString(m) }
func (*JoinReaderSpec) ProtoMessage() {}
func (*JoinReaderSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{3}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{4}
}
func (m *JoinReaderSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -870,7 +907,7 @@ func (m *SorterSpec) Reset() { *m = SorterSpec{} }
func (m *SorterSpec) String() string { return proto.CompactTextString(m) }
func (*SorterSpec) ProtoMessage() {}
func (*SorterSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{4}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{5}
}
func (m *SorterSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -932,7 +969,7 @@ func (m *DistinctSpec) Reset() { *m = DistinctSpec{} }
func (m *DistinctSpec) String() string { return proto.CompactTextString(m) }
func (*DistinctSpec) ProtoMessage() {}
func (*DistinctSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{5}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{6}
}
func (m *DistinctSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -967,7 +1004,7 @@ func (m *OrdinalitySpec) Reset() { *m = OrdinalitySpec{} }
func (m *OrdinalitySpec) String() string { return proto.CompactTextString(m) }
func (*OrdinalitySpec) ProtoMessage() {}
func (*OrdinalitySpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{6}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{7}
}
func (m *OrdinalitySpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1025,7 +1062,7 @@ func (m *ZigzagJoinerSpec) Reset() { *m = ZigzagJoinerSpec{} }
func (m *ZigzagJoinerSpec) String() string { return proto.CompactTextString(m) }
func (*ZigzagJoinerSpec) ProtoMessage() {}
func (*ZigzagJoinerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{7}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{8}
}
func (m *ZigzagJoinerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1105,7 +1142,7 @@ func (m *MergeJoinerSpec) Reset() { *m = MergeJoinerSpec{} }
func (m *MergeJoinerSpec) String() string { return proto.CompactTextString(m) }
func (*MergeJoinerSpec) ProtoMessage() {}
func (*MergeJoinerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{8}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{9}
}
func (m *MergeJoinerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1178,7 +1215,7 @@ func (m *HashJoinerSpec) Reset() { *m = HashJoinerSpec{} }
func (m *HashJoinerSpec) String() string { return proto.CompactTextString(m) }
func (*HashJoinerSpec) ProtoMessage() {}
func (*HashJoinerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{9}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{10}
}
func (m *HashJoinerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1294,7 +1331,7 @@ func (m *InvertedJoinerSpec) Reset() { *m = InvertedJoinerSpec{} }
func (m *InvertedJoinerSpec) String() string { return proto.CompactTextString(m) }
func (*InvertedJoinerSpec) ProtoMessage() {}
func (*InvertedJoinerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{10}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{11}
}
func (m *InvertedJoinerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1355,7 +1392,7 @@ func (m *InvertedFiltererSpec) Reset() { *m = InvertedFiltererSpec{} }
func (m *InvertedFiltererSpec) String() string { return proto.CompactTextString(m) }
func (*InvertedFiltererSpec) ProtoMessage() {}
func (*InvertedFiltererSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{11}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{12}
}
func (m *InvertedFiltererSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1393,7 +1430,7 @@ func (m *InvertedFiltererSpec_PreFiltererSpec) Reset() { *m = InvertedFi
func (m *InvertedFiltererSpec_PreFiltererSpec) String() string { return proto.CompactTextString(m) }
func (*InvertedFiltererSpec_PreFiltererSpec) ProtoMessage() {}
func (*InvertedFiltererSpec_PreFiltererSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{11, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{12, 0}
}
func (m *InvertedFiltererSpec_PreFiltererSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1439,7 +1476,7 @@ func (m *AggregatorSpec) Reset() { *m = AggregatorSpec{} }
func (m *AggregatorSpec) String() string { return proto.CompactTextString(m) }
func (*AggregatorSpec) ProtoMessage() {}
func (*AggregatorSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{12}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{13}
}
func (m *AggregatorSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1490,7 +1527,7 @@ func (m *AggregatorSpec_Aggregation) Reset() { *m = AggregatorSpec_Aggre
func (m *AggregatorSpec_Aggregation) String() string { return proto.CompactTextString(m) }
func (*AggregatorSpec_Aggregation) ProtoMessage() {}
func (*AggregatorSpec_Aggregation) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{12, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{13, 0}
}
func (m *AggregatorSpec_Aggregation) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1530,7 +1567,7 @@ func (m *ProjectSetSpec) Reset() { *m = ProjectSetSpec{} }
func (m *ProjectSetSpec) String() string { return proto.CompactTextString(m) }
func (*ProjectSetSpec) ProtoMessage() {}
func (*ProjectSetSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{13}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{14}
}
func (m *ProjectSetSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1572,7 +1609,7 @@ func (m *WindowerSpec) Reset() { *m = WindowerSpec{} }
func (m *WindowerSpec) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec) ProtoMessage() {}
func (*WindowerSpec) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15}
}
func (m *WindowerSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1608,7 +1645,7 @@ func (m *WindowerSpec_Func) Reset() { *m = WindowerSpec_Func{} }
func (m *WindowerSpec_Func) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec_Func) ProtoMessage() {}
func (*WindowerSpec_Func) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 0}
}
func (m *WindowerSpec_Func) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1644,7 +1681,7 @@ func (m *WindowerSpec_Frame) Reset() { *m = WindowerSpec_Frame{} }
func (m *WindowerSpec_Frame) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec_Frame) ProtoMessage() {}
func (*WindowerSpec_Frame) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1}
}
func (m *WindowerSpec_Frame) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1685,7 +1722,7 @@ func (m *WindowerSpec_Frame_Bound) Reset() { *m = WindowerSpec_Frame_Bou
func (m *WindowerSpec_Frame_Bound) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec_Frame_Bound) ProtoMessage() {}
func (*WindowerSpec_Frame_Bound) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1, 0}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1, 0}
}
func (m *WindowerSpec_Frame_Bound) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1721,7 +1758,7 @@ func (m *WindowerSpec_Frame_Bounds) Reset() { *m = WindowerSpec_Frame_Bo
func (m *WindowerSpec_Frame_Bounds) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec_Frame_Bounds) ProtoMessage() {}
func (*WindowerSpec_Frame_Bounds) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 1, 1}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 1, 1}
}
func (m *WindowerSpec_Frame_Bounds) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1771,7 +1808,7 @@ func (m *WindowerSpec_WindowFn) Reset() { *m = WindowerSpec_WindowFn{} }
func (m *WindowerSpec_WindowFn) String() string { return proto.CompactTextString(m) }
func (*WindowerSpec_WindowFn) ProtoMessage() {}
func (*WindowerSpec_WindowFn) Descriptor() ([]byte, []int) {
- return fileDescriptor_processors_sql_d49510defcc5472b, []int{14, 2}
+ return fileDescriptor_processors_sql_018ced668a37bbd5, []int{15, 2}
}
func (m *WindowerSpec_WindowFn) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -1799,6 +1836,7 @@ var xxx_messageInfo_WindowerSpec_WindowFn proto.InternalMessageInfo
func init() {
proto.RegisterType((*ValuesCoreSpec)(nil), "cockroach.sql.distsqlrun.ValuesCoreSpec")
proto.RegisterType((*TableReaderSpec)(nil), "cockroach.sql.distsqlrun.TableReaderSpec")
+ proto.RegisterType((*FiltererSpec)(nil), "cockroach.sql.distsqlrun.FiltererSpec")
proto.RegisterType((*IndexSkipTableReaderSpec)(nil), "cockroach.sql.distsqlrun.IndexSkipTableReaderSpec")
proto.RegisterType((*JoinReaderSpec)(nil), "cockroach.sql.distsqlrun.JoinReaderSpec")
proto.RegisterType((*SorterSpec)(nil), "cockroach.sql.distsqlrun.SorterSpec")
@@ -1963,6 +2001,32 @@ func (m *TableReaderSpec) MarshalTo(dAtA []byte) (int, error) {
return i, nil
}
+func (m *FiltererSpec) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FiltererSpec) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Filter.Size()))
+ n2, err := m.Filter.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ return i, nil
+}
+
func (m *IndexSkipTableReaderSpec) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -1981,11 +2045,11 @@ func (m *IndexSkipTableReaderSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Table.Size()))
- n2, err := m.Table.MarshalTo(dAtA[i:])
+ n3, err := m.Table.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n2
+ i += n3
dAtA[i] = 0x10
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.IndexIdx))
@@ -2039,39 +2103,39 @@ func (m *JoinReaderSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Table.Size()))
- n3, err := m.Table.MarshalTo(dAtA[i:])
+ n4, err := m.Table.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n3
+ i += n4
dAtA[i] = 0x10
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.IndexIdx))
if len(m.LookupColumns) > 0 {
- dAtA5 := make([]byte, len(m.LookupColumns)*10)
- var j4 int
+ dAtA6 := make([]byte, len(m.LookupColumns)*10)
+ var j5 int
for _, num := range m.LookupColumns {
for num >= 1<<7 {
- dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j4++
+ j5++
}
- dAtA5[j4] = uint8(num)
- j4++
+ dAtA6[j5] = uint8(num)
+ j5++
}
dAtA[i] = 0x1a
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j4))
- i += copy(dAtA[i:], dAtA5[:j4])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j5))
+ i += copy(dAtA[i:], dAtA6[:j5])
}
dAtA[i] = 0x22
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OnExpr.Size()))
- n6, err := m.OnExpr.MarshalTo(dAtA[i:])
+ n7, err := m.OnExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n6
+ i += n7
dAtA[i] = 0x30
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Type))
@@ -2145,11 +2209,11 @@ func (m *SorterSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OutputOrdering.Size()))
- n7, err := m.OutputOrdering.MarshalTo(dAtA[i:])
+ n8, err := m.OutputOrdering.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n7
+ i += n8
dAtA[i] = 0x10
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OrderingMatchLen))
@@ -2258,30 +2322,30 @@ func (m *ZigzagJoinerSpec) MarshalTo(dAtA []byte) (int, error) {
}
}
if len(m.IndexOrdinals) > 0 {
- dAtA9 := make([]byte, len(m.IndexOrdinals)*10)
- var j8 int
+ dAtA10 := make([]byte, len(m.IndexOrdinals)*10)
+ var j9 int
for _, num := range m.IndexOrdinals {
for num >= 1<<7 {
- dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j8++
+ j9++
}
- dAtA9[j8] = uint8(num)
- j8++
+ dAtA10[j9] = uint8(num)
+ j9++
}
dAtA[i] = 0x1a
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j8))
- i += copy(dAtA[i:], dAtA9[:j8])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j9))
+ i += copy(dAtA[i:], dAtA10[:j9])
}
dAtA[i] = 0x22
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OnExpr.Size()))
- n10, err := m.OnExpr.MarshalTo(dAtA[i:])
+ n11, err := m.OnExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n10
+ i += n11
if len(m.FixedValues) > 0 {
for _, msg := range m.FixedValues {
dAtA[i] = 0x2a
@@ -2318,27 +2382,27 @@ func (m *MergeJoinerSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.LeftOrdering.Size()))
- n11, err := m.LeftOrdering.MarshalTo(dAtA[i:])
+ n12, err := m.LeftOrdering.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n11
+ i += n12
dAtA[i] = 0x12
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.RightOrdering.Size()))
- n12, err := m.RightOrdering.MarshalTo(dAtA[i:])
+ n13, err := m.RightOrdering.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n12
+ i += n13
dAtA[i] = 0x2a
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OnExpr.Size()))
- n13, err := m.OnExpr.MarshalTo(dAtA[i:])
+ n14, err := m.OnExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n13
+ i += n14
dAtA[i] = 0x30
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Type))
@@ -2385,47 +2449,47 @@ func (m *HashJoinerSpec) MarshalTo(dAtA []byte) (int, error) {
var l int
_ = l
if len(m.LeftEqColumns) > 0 {
- dAtA15 := make([]byte, len(m.LeftEqColumns)*10)
- var j14 int
+ dAtA16 := make([]byte, len(m.LeftEqColumns)*10)
+ var j15 int
for _, num := range m.LeftEqColumns {
for num >= 1<<7 {
- dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j14++
+ j15++
}
- dAtA15[j14] = uint8(num)
- j14++
+ dAtA16[j15] = uint8(num)
+ j15++
}
dAtA[i] = 0xa
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j14))
- i += copy(dAtA[i:], dAtA15[:j14])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j15))
+ i += copy(dAtA[i:], dAtA16[:j15])
}
if len(m.RightEqColumns) > 0 {
- dAtA17 := make([]byte, len(m.RightEqColumns)*10)
- var j16 int
+ dAtA18 := make([]byte, len(m.RightEqColumns)*10)
+ var j17 int
for _, num := range m.RightEqColumns {
for num >= 1<<7 {
- dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j16++
+ j17++
}
- dAtA17[j16] = uint8(num)
- j16++
+ dAtA18[j17] = uint8(num)
+ j17++
}
dAtA[i] = 0x12
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j16))
- i += copy(dAtA[i:], dAtA17[:j16])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j17))
+ i += copy(dAtA[i:], dAtA18[:j17])
}
dAtA[i] = 0x2a
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OnExpr.Size()))
- n18, err := m.OnExpr.MarshalTo(dAtA[i:])
+ n19, err := m.OnExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n18
+ i += n19
dAtA[i] = 0x30
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Type))
@@ -2466,30 +2530,30 @@ func (m *InvertedJoinerSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Table.Size()))
- n19, err := m.Table.MarshalTo(dAtA[i:])
+ n20, err := m.Table.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n19
+ i += n20
dAtA[i] = 0x10
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.IndexIdx))
dAtA[i] = 0x22
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.InvertedExpr.Size()))
- n20, err := m.InvertedExpr.MarshalTo(dAtA[i:])
+ n21, err := m.InvertedExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n20
+ i += n21
dAtA[i] = 0x2a
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OnExpr.Size()))
- n21, err := m.OnExpr.MarshalTo(dAtA[i:])
+ n22, err := m.OnExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n21
+ i += n22
dAtA[i] = 0x30
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Type))
@@ -2533,20 +2597,20 @@ func (m *InvertedFiltererSpec) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.InvertedExpr.Size()))
- n22, err := m.InvertedExpr.MarshalTo(dAtA[i:])
+ n23, err := m.InvertedExpr.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n22
+ i += n23
if m.PreFiltererSpec != nil {
dAtA[i] = 0x32
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.PreFiltererSpec.Size()))
- n23, err := m.PreFiltererSpec.MarshalTo(dAtA[i:])
+ n24, err := m.PreFiltererSpec.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n23
+ i += n24
}
return i, nil
}
@@ -2569,20 +2633,20 @@ func (m *InvertedFiltererSpec_PreFiltererSpec) MarshalTo(dAtA []byte) (int, erro
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Expression.Size()))
- n24, err := m.Expression.MarshalTo(dAtA[i:])
+ n25, err := m.Expression.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n24
+ i += n25
if m.Type != nil {
dAtA[i] = 0x12
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Type.Size()))
- n25, err := m.Type.MarshalTo(dAtA[i:])
+ n26, err := m.Type.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n25
+ i += n26
}
return i, nil
}
@@ -2603,21 +2667,21 @@ func (m *AggregatorSpec) MarshalTo(dAtA []byte) (int, error) {
var l int
_ = l
if len(m.GroupCols) > 0 {
- dAtA27 := make([]byte, len(m.GroupCols)*10)
- var j26 int
+ dAtA28 := make([]byte, len(m.GroupCols)*10)
+ var j27 int
for _, num := range m.GroupCols {
for num >= 1<<7 {
- dAtA27[j26] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j26++
+ j27++
}
- dAtA27[j26] = uint8(num)
- j26++
+ dAtA28[j27] = uint8(num)
+ j27++
}
dAtA[i] = 0x12
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j26))
- i += copy(dAtA[i:], dAtA27[:j26])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j27))
+ i += copy(dAtA[i:], dAtA28[:j27])
}
if len(m.Aggregations) > 0 {
for _, msg := range m.Aggregations {
@@ -2632,21 +2696,21 @@ func (m *AggregatorSpec) MarshalTo(dAtA []byte) (int, error) {
}
}
if len(m.OrderedGroupCols) > 0 {
- dAtA29 := make([]byte, len(m.OrderedGroupCols)*10)
- var j28 int
+ dAtA30 := make([]byte, len(m.OrderedGroupCols)*10)
+ var j29 int
for _, num := range m.OrderedGroupCols {
for num >= 1<<7 {
- dAtA29[j28] = uint8(uint64(num)&0x7f | 0x80)
+ dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
- j28++
+ j29++
}
- dAtA29[j28] = uint8(num)
- j28++
+ dAtA30[j29] = uint8(num)
+ j29++
}
dAtA[i] = 0x22
i++
- i = encodeVarintProcessorsSql(dAtA, i, uint64(j28))
- i += copy(dAtA[i:], dAtA29[:j28])
+ i = encodeVarintProcessorsSql(dAtA, i, uint64(j29))
+ i += copy(dAtA[i:], dAtA30[:j29])
}
dAtA[i] = 0x28
i++
@@ -2842,11 +2906,11 @@ func (m *WindowerSpec_Frame) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x12
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Bounds.Size()))
- n30, err := m.Bounds.MarshalTo(dAtA[i:])
+ n31, err := m.Bounds.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n30
+ i += n31
dAtA[i] = 0x18
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Exclusion))
@@ -2883,11 +2947,11 @@ func (m *WindowerSpec_Frame_Bound) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0x22
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.OffsetType.Size()))
- n31, err := m.OffsetType.MarshalTo(dAtA[i:])
+ n32, err := m.OffsetType.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n31
+ i += n32
return i, nil
}
@@ -2909,20 +2973,20 @@ func (m *WindowerSpec_Frame_Bounds) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Start.Size()))
- n32, err := m.Start.MarshalTo(dAtA[i:])
+ n33, err := m.Start.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n32
+ i += n33
if m.End != nil {
dAtA[i] = 0x12
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.End.Size()))
- n33, err := m.End.MarshalTo(dAtA[i:])
+ n34, err := m.End.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n33
+ i += n34
}
return i, nil
}
@@ -2945,28 +3009,28 @@ func (m *WindowerSpec_WindowFn) MarshalTo(dAtA []byte) (int, error) {
dAtA[i] = 0xa
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Func.Size()))
- n34, err := m.Func.MarshalTo(dAtA[i:])
+ n35, err := m.Func.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n34
+ i += n35
dAtA[i] = 0x22
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Ordering.Size()))
- n35, err := m.Ordering.MarshalTo(dAtA[i:])
+ n36, err := m.Ordering.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n35
+ i += n36
if m.Frame != nil {
dAtA[i] = 0x2a
i++
i = encodeVarintProcessorsSql(dAtA, i, uint64(m.Frame.Size()))
- n36, err := m.Frame.MarshalTo(dAtA[i:])
+ n37, err := m.Frame.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
- i += n36
+ i += n37
}
dAtA[i] = 0x30
i++
@@ -3047,6 +3111,17 @@ func (m *TableReaderSpec) Size() (n int) {
return n
}
+func (m *FiltererSpec) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = m.Filter.Size()
+ n += 1 + l + sovProcessorsSql(uint64(l))
+ return n
+}
+
func (m *IndexSkipTableReaderSpec) Size() (n int) {
if m == nil {
return 0
@@ -4002,6 +4077,86 @@ func (m *TableReaderSpec) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *FiltererSpec) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowProcessorsSql
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: FiltererSpec: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: FiltererSpec: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowProcessorsSql
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthProcessorsSql
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipProcessorsSql(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthProcessorsSql
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func (m *IndexSkipTableReaderSpec) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -7841,11 +7996,11 @@ var (
)
func init() {
- proto.RegisterFile("sql/execinfrapb/processors_sql.proto", fileDescriptor_processors_sql_d49510defcc5472b)
+ proto.RegisterFile("sql/execinfrapb/processors_sql.proto", fileDescriptor_processors_sql_018ced668a37bbd5)
}
-var fileDescriptor_processors_sql_d49510defcc5472b = []byte{
- // 2856 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_processors_sql_018ced668a37bbd5 = []byte{
+ // 2868 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7,
0x55, 0xcb, 0x0f, 0x91, 0x7c, 0xfc, 0x1a, 0x8f, 0x9d, 0x98, 0x51, 0x52, 0x59, 0xa6, 0x1d, 0x5b,
0x76, 0x1c, 0xa9, 0x51, 0x8b, 0x14, 0x49, 0x8b, 0xa2, 0x14, 0xb9, 0xa4, 0x29, 0x53, 0xbb, 0xf4,
@@ -7891,138 +8046,139 @@ var fileDescriptor_processors_sql_d49510defcc5472b = []byte{
0x71, 0x4f, 0x5c, 0x8f, 0x8e, 0x48, 0x50, 0x2b, 0x85, 0x08, 0x39, 0x3a, 0xd0, 0xdd, 0x0e, 0x47,
0x57, 0x45, 0x3d, 0xbc, 0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, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x31, 0x2d, 0x93, 0x69,
+ 0x70, 0x21, 0x00, 0x00,
}
diff --git a/pkg/sql/execinfrapb/processors_sql.proto b/pkg/sql/execinfrapb/processors_sql.proto
index dcfef477ce41..3725c6781531 100644
--- a/pkg/sql/execinfrapb/processors_sql.proto
+++ b/pkg/sql/execinfrapb/processors_sql.proto
@@ -145,6 +145,14 @@ message TableReaderSpec {
repeated uint32 needed_columns = 15;
}
+// FiltererSpec is the specification for a processor that filters input rows
+// according to a boolean expression.
+message FiltererSpec {
+ // A filtering expression which references the internal columns of the
+ // processor via ordinal references (@1, @2, etc).
+ optional Expression filter = 1 [(gogoproto.nullable) = false];
+}
+
// IndexSkipTableReaderSpec is the specification for a table reader that
// is performing a loose index scan over rows in the table. This means that
// this reader will return distinct rows from the table while using the index
diff --git a/pkg/sql/flowinfra/server_test.go b/pkg/sql/flowinfra/server_test.go
index 23aad9f6ad5a..9d9f909ac0ce 100644
--- a/pkg/sql/flowinfra/server_test.go
+++ b/pkg/sql/flowinfra/server_test.go
@@ -58,7 +58,6 @@ func TestServer(t *testing.T) {
Spans: []execinfrapb.TableReaderSpan{{Span: td.PrimaryIndexSpan(keys.SystemSQLCodec)}},
}
post := execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 != 2"}, // a != 2
Projection: true,
OutputColumns: []uint32{0, 1}, // a
}
@@ -113,7 +112,7 @@ func TestServer(t *testing.T) {
t.Errorf("unexpected metadata: %v", metas)
}
str := rows.String(rowenc.TwoIntCols)
- expected := "[[1 10] [3 30]]"
+ expected := "[[1 10] [2 20] [3 30]]"
if str != expected {
t.Errorf("invalid results: %s, expected %s'", str, expected)
}
diff --git a/pkg/sql/logictest/testdata/logic_test/geospatial b/pkg/sql/logictest/testdata/logic_test/geospatial
index 55ba050cf73f..513224029278 100644
--- a/pkg/sql/logictest/testdata/logic_test/geospatial
+++ b/pkg/sql/logictest/testdata/logic_test/geospatial
@@ -5614,3 +5614,34 @@ MULTILINESTRING ((0 0, 1 1), (1 1, 2.5 2.5), (1 3, 2.5 2.5), (2.5 2.5, 4 4), (4
statement error geometry type is unsupported. Please pass a LineString or a MultiLineString
SELECT ST_AsText(ST_Node(ST_GeomFromText('POLYGON((1 1, 1 3, 3 3, 3 1, 1 1))')));
+
+
+query T
+SELECT
+ST_AsEWKT(
+ ST_SubDivide('SRID=4326;POLYGON((132 10,119 23,85 35,68 29,66 28,49 42,32 56,22 64,32 110,40 119,36 150,
+ 57 158,75 171,92 182,114 184,132 186,146 178,176 184,179 162,184 141,190 122,
+ 190 100,185 79,186 56,186 52,178 34,168 18,147 13,132 10))'::geometry,10)
+)
+----
+SRID=4326;POLYGON ((119 23, 85 35, 68 29, 66 28, 32 56, 22 64, 29.826086956521738 100, 119 100, 119 23))
+SRID=4326;POLYGON ((132 10, 119 23, 119 56, 186 56, 186 52, 178 34, 168 18, 147 13, 132 10))
+SRID=4326;POLYGON ((119 56, 119 100, 190 100, 185 79, 186 56, 119 56))
+SRID=4326;POLYGON ((29.826086956521738 100, 32 110, 40 119, 36 150, 57 158, 75 171, 92 182, 114 184, 114 100, 29.826086956521738 100))
+SRID=4326;POLYGON ((114 184, 132 186, 146 178, 176 184, 179 162, 184 141, 190 122, 190 100, 114 100, 114 184))
+
+query T
+SELECT ST_AsText(ST_Subdivide('POLYGON((-1 -1,-1 -0.5, -1 0, 1 0.5, 1 -1,-1 -1))'::geometry))
+----
+POLYGON ((-1 -1, -1 -0.5, -1 0, 1 0.5, 1 -1, -1 -1))
+
+query T
+SELECT ST_AsText(ST_Subdivide('SRID=4269;LINESTRING(0 0, 10 15, 0 0, 10 15, 10 0, 10 15)'::geometry, 5))
+----
+LINESTRING (0 0, 5 7.5)
+LINESTRING (10 7.5, 10 0)
+LINESTRING (5 7.5, 10 15)
+LINESTRING (10 15, 10 7.5)
+
+statement error pq: max_vertices number cannot be less than 5
+SELECT ST_AsText(ST_SubDivide(ST_GeomFromText('POLYGON((1 1, 1 3, 3 3, 3 1, 1 1))'), 4));
diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist
index 59bc5b6ef46f..3a212bcc1770 100644
--- a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist
+++ b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_dist
@@ -35,7 +35,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_Intersects('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU11P2zAUfd-vsO4Ljea1dtJpw0-FEbZMhbA004ZwhLLmjkUEO7PdKRPqf5-SMKBFLdQPTu7HObnnOL4F-7sCAbNwGn5IycJU5DiJT8hF-P1sehCdksFRNEtnX6YeuWu57huuUF-6_EeF5NunMAmJdZelcmgszp0d7J18nabRWRydpoOBP_SJP_Q9SgbBkJFgyDxvT4iPYXwSpsk5bbluPBInR2FCDs_JdQYUlC7wNL9BC-ICOGQUaqPnaK02beq2a4iKBgSjUKp64dp0RmGuDYK4BVe6CkFA2g6ZYF6gGTGgUKDLy6qjvdcwaSe4LFWBDVCY1bmygowkHErZ_CykbDiTsmHPbfBmVwyXQHJVkIAR7X6hsZAtKeiFe9BjXX6FIPiSvlxzpP6gcVgcl5VDg2bEV4X_r4dNbYhWZMIFsa1qYl1unOhUBO_eSsl8JiVjz21AUBW7wlrxa-opxAsnyIRv9MHfxYfPulR3R-9vOvralDe5-QsUerfE-q_MOBuzfvl3T854_7J_sH-_GB8_iR86V9b78ZN4Tzy-ERPfe4EXwS5ezLRxaEbBqg8T_noj_XgX-gRtrZXFFfpNzGyZUcDiCvurbPXCzPHM6Hn3mT6MO1yXKNC6vsr7IFJ9qR3wMZhvBfvbwf5WcLAdHGwFj9fA2fLVvwAAAP__ks-wYA==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlNFP2z4Qx99_f4V1L7T6ea3tBG34qTDClqlQlnbaEK5Q1txYRLEz250yof7vUxIGtKiB-MHtne9zd9-znDtwv5YgYRqNo_czsrJLcpJMTsll9O18fBifkd5xPJ1NP4_75D7kpgm4RnPl0-9LJF8_RklEnL_KtUfrcOFdb-_0y3gWn0_is1mvJwaCiIHoU9ILBowEA9bv70n5IZqcRrPkgla5bvtkkhxHCTm6IDdzoKBNhmfpLTqQl8BhTqGwZoHOGVu57uqAOCtBMgq5Lla-cs8pLIxFkHfgc79EkDCrmkwwzdAOGVDI0Kf5sk77oGFUdXCV6wxLoDAtUu0kGSo4Uqr8kSlVcqZUyV7a4E1Xhisgqc5IwIjxP9E6mK8pmJV_1ON8eo0g-Zq-XnOsf6P1mJ3kS48W7ZBvCv93HpWFJUaTEZfEVaqJ86n1slYRvN1XigmmFGMvbUBQZ12xSvyWegqTlZdkxHfOQXSZwyeT6_urF7uuvrD5bWr_PJamI7GzetCl-sP0g83ajV9uPxnGWciaJe5_OePNn4PDg4fFePjMfozcWO_CZ_aefPryRqL_ipmHXVRPjfVoh-Gm5hH_f2f6_S7pE3SF0Q430u_KzNZzCphdY_PJcGZlF3huzaIu05iTmqsdGTrfnPLGiHVzVDX4FOatsGiHRSsctMNBKxy2w2ErvL8Fz9f__Q0AAP__-jPmKw==
# The inverted filterer handles five inverted index rows with decoded
# datums, where the first column is the PK (k) and the second is the cellid
@@ -65,7 +65,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_Intersects('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU11P2zAUfd-vsO4Ljea1dtJpw0-FEbZMhbA004ZwhLLmjkUEO7PdKRPqf5-SMKBFLdQPTu7HObnnOL4F-7sCAbNwGn5IycJU5DiJT8hF-P1sehCdksFRNEtnX6YeuWu57huuUF-6_EeF5NunMA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rD5bWr_PJamI7GzetCl-sP0g83ajV9uPxnGWciaJe5_OePNn4PDg4fFePjMfozcWO_CZ_aefPryRqL_ipmHXVRPjfVoh-Gm5hH_f2f6_S7pE3SF0Q430u_KzNZzCphdY_PJcGZlF3huzaIu05iTmqsdGTrfnPLGiHVzVDX4FOatsGiHRSsctMNBKxy2w2ErvL8Fz9f__Q0AAP__-jPmKw==
statement ok
ALTER INDEX geo_table@geom_index EXPERIMENTAL_RELOCATE VALUES (ARRAY[2], 1152921574000000000)
@@ -89,7 +89,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_Intersects('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU11P2zAUfd-vsO4Ljea1dtJpw0-FEbZMhbA004ZwhLLmjkUEO7PdKRPqf5-SMKBFLdQPTu7HObnnOL4F-7sCAbNwGn5IycJU5DiJT8hF-P1sehCdksFRNEtnX6YeuWu57huuUF-6_EeF5NunMAmJdZelcmgszp0d7J18nabRWRydpoOBP_SJP_Q9SgbBkJFgyDxvT4iPYXwSpsk5bbluPBInR2FCDs_JdQYUlC7wNL9BC-ICOGQUaqPnaK02beq2a4iKBgSjUKp64dp0RmGuDYK4BVe6CkFA2g6ZYF6gGTGgUKDLy6qjvdcwaSe4LFWBDVCY1bmygowkHErZ_CykbDiTsmHPbfBmVwyXQHJVkIAR7X6hsZAtKeiFe9BjXX6FIPiSvlxzpP6gcVgcl5VDg2bEV4X_r4dNbYhWZMIFsa1qYl1unOhUBO_eSsl8JiVjz21AUBW7wlrxa-opxAsnyIRv9MHfxYfPulR3R-9vOvralDe5-QsUerfE-q_MOBuzfvl3T854_7J_sH-_GB8_iR86V9b78ZN4Tzy-ERPfe4EXwS5ezLRxaEbBqg8T_noj_XgX-gRtrZXFFfpNzGyZUcDiCvurbPXCzPHM6Hn3mT6MO1yXKNC6vsr7IFJ9qR3wMZhvBfvbwf5WcLAdHGwFj9fA2fLVvwAAAP__ks-wYA==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlNFP2z4Qx99_f4V1L7T6ea3tBG34qTDClqlQlnbaEK5Q1txYRLEz250yof7vUxIGtKiB-MHtne9zd9-znDtwv5YgYRqNo_czsrJLcpJMTsll9O18fBifkd5xPJ1NP4_75D7kpgm4RnPl0-9LJF8_RklEnL_KtUfrcOFdb-_0y3gWn0_is1mvJwaCiIHoU9ILBowEA9bv70n5IZqcRrPkgla5bvtkkhxHCTm6IDdzoKBNhmfpLTqQl8BhTqGwZoHOGVu57uqAOCtBMgq5Lla-cs8pLIxFkHfgc79EkDCrmkwwzdAOGVDI0Kf5sk77oGFUdXCV6wxLoDAtUu0kGSo4Uqr8kSlVcqZUyV7a4E1Xhisgqc5IwIjxP9E6mK8pmJV_1ON8eo0g-Zq-XnOsf6P1mJ3kS48W7ZBvCv93HpWFJUaTEZfEVaqJ86n1slYRvN1XigmmFGMvbUBQZ12xSvyWegqTlZdkxHfOQXSZwyeT6_urF7uuvrD5bWr_PJamI7GzetCl-sP0g83ajV9uPxnGWciaJe5_OePNn4PDg4fFePjMfozcWO_CZ_aefPryRqL_ipmHXVRPjfVoh-Gm5hH_f2f6_S7pE3SF0Q430u_KzNZzCphdY_PJcGZlF3huzaIu05iTmqsdGTrfnPLGiHVzVDX4FOatsGiHRSsctMNBKxy2w2ErvL8Fz9f__Q0AAP__-jPmKw==
# Data is distributed, but the filterer can't be distributed since it is not a union.
query I
@@ -102,7 +102,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_CoveredBy('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU19P2z4Uff99Cuu-0OjntXbSacNPhRG2TIWwNNOGcIRCfcciQpzZLgpC_e5TEgYU1EL94OT-OSf3HMd3YP-UIGAWTsNPKVmYkhwm8RE5C3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cg2szhm8nyh6sX265-YbOb1N49laYDsbV60Kb64_SD9dq1X268GMZZyOolHn454_Wfvf29x8V4-MJ-ilxbn8IX9o58_vAGovuGkYdtRI-N9Wj74brkAX-_Nf1um_QJuoXJHa6l35aZraYUUF9h_cVwZmlneGrNrCpTm6OKqxwana9PeW3EeX1UNvgc5o2waIZFIxw0w0EjHDbDYSO8uwFPV-_-BQAA__-NuOUp
# Move all the index data that will be read to node 2 while the query executes
# at node 1. The filtering moves to node 2 when it is distributable.
@@ -129,7 +129,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_Intersects('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlFFP2zAQx9_3Kax7odVMaztBG34qjLBlKi1LO20IVyhrbiyi2JntTplQv_uUhAEFNaV-cHu--13y_1uXO3C_FyBhEg2jD1OytAtymozPyGX0_Xx4FI9I5ySeTCdfhl1yX3LTFFyjufLpjwWSb5-iJCLOX-Xao3U4966zd_Z1OI3Px_Fo2umIniCiJ7qUdIIeI0GPdbt7Un6MxmfRNLmgVa_bLhknJ1FCji_IzQwoaJPhKL1FB_ISOFAQMKNQWDNH54ytju_qojgrQTIKuS6WvjqeUZgbiyDvwOd-gSBhZPZN0Q-BQoY-zRd12YqCWfpHyPn0GkEerOiTxry98bRyIME0Q9tna-3hwaBBJe8q1xmWQGFSpNpJ0ldwrFT5M1Oq5Eypkm3bYH9Xhisgqc5IwIjxv9A62KSZ76I51n_QesxO84VHi7bP14X_z0dlYYnRZMAlcZVq4nxqvaxVBO8OlGKCKcXYtg0I6mxXrBL_TD2F8dJLMuAbfRC7-PDZ5Pr-6sWmqy9sfpvav0ChcUs-nxPGWciaJe5_OePNn8Ojw4fFePgifqxcW-_DF_GefDpuA9F9hRfBLl5MjPVo-8G6DwP-dmP7cK39lvlN0BVGO3zVALPVjAJm19h8I5xZ2jmeWzOvH9OE45qrDzJ0vskeNEGsm1T1gk9h3gqLdli0wkE7HLTCYTsctsLsGTxbvfkXAAD__4th4nc=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlFFP2zAQx9_3Kax7odVMazspG34qjLBlKi1LO20IVyhrbiyi2JntTp1Qv_uUhgEFNSV-cHvn-93lf5bvDtzvOUgYR4Pow4Qs7JycJqMzchl9Px8cxUPSOonHk_GXQZvch9xUAddornz6Y47k26coiYjzV7n2aB3OvGvtnX0dTOLzUTyctFqiI4joiDYlraDDSNBh7faelB-j0Vk0SS5omeu2TUbJSZSQ4wtyMwUK2mQ4TG_RgbwEDhQETCkU1szQOWNL9906KM6WIBmFXBcLX7qnFGbGIsg78LmfI0gYmn1TdHtAIUOf5vN12IqCWfhHyPn0GkEerOiTxLw-8aTsQIJphrbLNtLDQ4P6pbyrXGe4BArjItVOkq6CY6WWPzOllpwptWS7NthvynAFJNUZCRgx_hdaB9s08yaaY_0HrcfsNJ97tGi7fFP4__NoWVhiNOlzSVypmjifWi_XKoJ3PaWYYEoxtmsDgjpripXin6mnMFp4Sfp8ax9Ekz58Nrm-v3qx7eoLm9-m9u9jadoXW6sHTao_dD_YrF355fP3yDgLWbXE_S9nvPpzeHT4sBgPX9iPkRvrffjC3pNPn3VftF_R87CJ6rGxHm033NTc52-3pu9tpN8xJxJ0hdEOXzUo2GpKAbNrrGaRMws7w3NrZusylTlac2tHhs5XpweVEevqqPzApzCvhUU9LGrhoB4OauGwHg5r4V493KuF2TN4unrzLwAA___ICRhW
query I
SELECT k FROM geo_table WHERE ST_CoveredBy('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k
@@ -142,7 +142,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE ST_CoveredBy('MULTIPOINT((2.2 2.2), (3.0 3.0))'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlNFP2z4Qx99_f4V1L7T6mdZ2gjb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oUg91b0WWJen3hSNiDBVKPtso308NiffinvIss1LoHCuEhzJ0lXwaFSy19aqSVnSi3ZWxvsNmW4ApLmmgSMGP8brYNtmnkTzXF-i9ajPs7mHi3aLt8U_u88WhaWmJz0uSSuVE2cT62XaxXBh55STDClGHtrA4K5boqV4l-opzBaeEn6fGsfRJM-fDVZ_nD1YtvVFza7Se3dU2naF1urB02qP3Y_2Kxd-eWL58g4C1m1xMMvZ7z6s3-w_7gYD1_ZT5Eb62P4yt6Rz191X7Tf0fKwieixsR5tN9yU3Of_b03f20j_xphI0BUmd_iuOcFWUwqor7AaRc4s7AxPrZmty1TmaM2tHRqdr073KiPOq6PyA5_DvBYW9bCohYN6OKiFw3o4rIV79XCvFmYv4Onqv78BAAD__9HCF1Q=
# Bounding box operations.
statement ok
@@ -152,22 +152,22 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE geom && 'POINT(3.0 3.0)'::geometry]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk19v2jAQwN_3Kax7oZXcYifsj_zE_qRbJgoMkLapjqoM31i0YGe2M2VCfPcpSbcWKkLhwdL57nfkd9ZtwP3KQcA8GkVvF6S0ObmaTa7JTfRlOnodj8nZu3i-mH8anZO7kp9twQrNrU-_5Ug-f4hmUR2viSwZC160J-lNJ_F4cRZeMhJesvOeEO-jyXW0mH1NgII2CsfpGh2IG-BAIYCEQmHNEp0ztr7eNEWxqkAwCpkuSl9fJxSWxiKIDfjM5wgCxubCFP0QKCj0aZY3ZVsKpvT3kPPpCkEMtvRBY97deFEbzjBVaPtspz38H8CwVr_NtMIKKMyLVDtB-hLeSFl9V1JWnElZsWMHXJzKcAkk1YqEjBj_A62DQ878FOdY_0brUV1luUeLts93xf_lo6qwxGgy5IK42po4n1ovGovw5XMpWcCkZOzYAQS1OhWr5ffsKUxKL8iQH5xDcMocPppM3z19cOjpC5utU_sHKLTTEmQY7G0B44yzx79Xg0dxT9yvyBNkwh2ZIxsyQ1cY7fBJK8K2CQVUK2y30JnSLnFqzbL5mzacNFxzodD5Njtog1i3qfoDH8K8Ew664aATDrvhsBNme3CyffY3AAD__xPOlyo=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk99v2jAQx9_3V1j30lZyi53ANvmJ_Ui3TBQYIG1TjaoM31i0YGe2M2VC_O9Tkq4UKkLJw0n343OX71m3Bvc7AwHTaBC9m5HCZuR6Mroht9HX8eBNPCTn7-PpbPp5cEHuS341BUs0dz75niH58jGaRJW_IrJgLHjZWHI2HsXD2Xl4xUh4xS7OhPgQjW6i2eTbHChoo3CYrNCBuAUOFAKYU8itWaBzxlbhdV0UqxIEo5DqvPBVeE5hYSyCWINPfYYgYGguTd7pAgWFPkmzumxDwRR-CzmfLBFEb0MfNebtjWeVwgkmCm2H7bSHhwX0K-l3qVZYAoVpnmgnSEfCWynLH0rKkjMpS3bMwOWpDJdAEq1IyIjxP9E6OKSZn6I51n_QelTXaebRou3wXeH_81GZW2I06XNBXKWaOJ9YL2oV4auelCxgUjJ2zABBrU7FKvF76imMCi9Inx_cQ3DKHj6ZVN8_fXDo6XObrhL7dzua9oOD08NTpj9sP9yd3cQF6Qd718Y44-zp97r7xD8T21N8xtK6O7995BIn6HKjHT7rFNlmTgHVEptrd6awCxxbs6jHNO6o5uqAQuebbK9xYt2kqh98DPNWOGiHg1Y4bIfDVrjbDndbYbYHzzcv_gUAAP__PV_M9g==
query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE 'POINT(3.0 3.0)'::geometry::box2d && geom]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk99v0zAQx9_5K0730k3yVDsZP-SnMpaJotGOthKV5moK9VEiUjvYDgqq-r-jJAPWjaZrHk66H5_Lfc-6DfofOUqcJtfJuxmULoeryfgj3Cbzm-u3wxGcXA6ns-mn61O4L_neFqzI3oX0S07w-X0ySaDHBRf86ffm_Infk_JiPI8uQZWcR69aWzdcL5ChsZpG6Zo8ylsUyDDCB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==
query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE 'LINESTRING(1.0 1.0, 5.0 5.0)'::geometry ~ geom]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk19v2jAQwN_3Kax7oZVcsBOqSX5if0KXiUIXkLapRlWGbyxasDPbTJkQ--xTknYFJEKxFEdn38_J76zbgPuVg4BpNIrezcja5mSYTG7JffTlbvQmHpOL9_F0Nv00uiSPKT-bhCWaB59-y5F8_hAlEemM4nE0nSXx-OaCdxnhXUbJdZdVz2VHiJtochvNkq_kb4Wu5kBBG4XjdIUOxD1woBDAnEJhzQKdM7Za3tRJsSpBMAqZLta-Wp5TWBiLIDbgM58jCBibK1P0QqCg0KdZXqdtKZi1f4acT5cIor-lOwfz9oNnlWSCqULbY3vHw_8aDCqlh0wrLIHCtEi1E6Qn4a2U5XclZcmZlCU7NcHVuQyXQFKtSBgQ43-gdXDMmZ_jHOvfaD2qYZZ7tGh7fF_8aT8qC0uMJgMuiKusifOp9aK2CF9fS8kCJiVjpyYgqNW5WCV_YE9hsvaCDPjROgTn1OGjyfTj1QfHrr6w2Sq1f4BCUy1BOoyzgDXj6b0zhiwctsW832eHcUfsddAgeIFpuGd6on0SdIXRDl_UP2w7p4BqiU2LOrO2C7yzZlF_pgknNVcvKHS-2e03QaybreoHd2HeCgftcNAKh-1w2AqzA3i-ffUvAAD__yQsnKQ=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUlG1v2jAQx9_vU1j3hlZywU6CJvkVewhdJgpdQNqmGlUZubFowc5sM2VC7LNXSfoASIRiKY7ufL-7_M-6bMD-yUHANByFH2ZkbXIyjCc35C78djt6F43JxcdoOpt-GV2Sx5DfTcAS9b1LfuRIvn4K45B0RtE4nM7iaHx9wbuM8C6jpN9l1XPZEeI6nNyEs_g7-V-hqzlQUDrFcbJCC-IOOFDwYE6hMHqB1mpTuTd1UJSWIBiFTBVrV7nnFBbaIIgNuMzlCALG-koXvQAopOiSLK_DthT02r1A1iVLBNHf0p3EvD3xrBIZY5Ki6bG99PDcg0El6T5TKZZAYVokygrSk_BeyvJnKmXJmZQlO7XB1bkMl0ASlRLfI9r9QmPhmGZ-juZI_UXjMB1muUODpsf3hT-dh2VhiFZkwAWxlWpiXWKcqFX4b_tSMo9JydipDQiq9FysEn-gnsJk7QQZ8KN98M7pw2edqcer945dfWGyVWL-vZSmA-9odf-c6s_d9_drN35BOowzjzXr6b2zhswfttk8CNih3RF7kzrwXtHRYE_TiTGN0RZaWXzVnLLtnAKmS2x-BVavzQJvjV7UZRpzUnO1I0XrmtN-Y0SqOao-cBfmrbDXDnutsN8O-61w0A4HrTA7gOfbNw8BAAD__31t0nA=
query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT k FROM geo_table WHERE geom ~ 'LINESTRING(1.0 1.0, 5.0 5.0)'::geometry::box2d]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk1Fv2jAQx9_3Kax7oZVcYSegaX5irEFjYtAB0pBqVGX4xqIFO7OdKRNin31KQldAIhQ_ODr7fs79_z5vwf1KQcAsGkUf5iS3KRlMJ5_JY7R4GL0fjsnN_XA2n30Z3ZJ9ys86YY3mycffUiRfP0bTqIw35C9pMc4CVo_n78EYsHDQFPNOh53GLSH6k0VwvwQK2igcxxt0IB6BA4UAlhQya1bonLHl8rZKGqoCBKOQ6Cz35fKSwspYBLEFn_gUQcDY3JmsHQIFhT5O0iptR8Hk_gVyPl4jiM6OHhzMmw-el75MMVZo2-zoePhvW6807CnRCgugMMti7QRpS-hLWXxXUhacSVmwSxPcXctwCSTWigTviPE_0Do4p5lfo3mof6P1qAZJ6tGibfNj4c_7UZFZYjTpcUFcqZo4H1svKhXh266ULGBSMnZpAoJaXYuV4k_UU5jkXpAeP-tDcI0Pn0yi91cfnLv6zCab2P4BCrVbgvSC8u30J4sbTjjtku5tS-zb_hUFhkcFXuj6KbrMaIevanu2W1JAtcb6ZTmT2xU-WLOqflOHk4qrFhQ6X-926mCo662ywEOYN8JBMxw0wmEzHDbC7ARe7t78CwAA__-z4Zbo
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk9Fv2j4Qx99_f4V1L7SSK-wk6Kf5ibEGjYlBB0hDqlGV4RuLFuzMNlMmxP72KQltAYlQ8uDozvfx-fu1bgvuVwYCpvEw_jAjG5uR_mT8mTzG84fh-8GI3NwPprPpl-Et2Zf8rAtWaJ588i1D8vVjPInLeE3-khbjLGD19_w_-Pos7DfFPIrYadwSojeeB_cLoKCNwlGyRgfiEThQCGBBIbdmic4ZW6a3VdFAFSAYhVTnG1-mFxSWxiKILfjUZwgCRubO5O0IKCj0SZpVZTsKZuNfIeeTFYLo7OjBwbz54FnpywQThbbNjo6HF9u6pWFPqVZYAIVpnmgnSFtCT8riu5Ky4EzKgl1a4O5ahksgiVYkeEeM_4HWwTnN_BrNA_0brUfVTzOPFm2bHwt_3o-L3BKjSZcL4krVxPnEelGpCP_vSMkCJiVjlxYgqNW1WCn-RD2F8cYL0uVnfQiu8eGTSfX-6YNzT5_bdJ3YP6-taTc42z28pvuL--Fx7zovSDcoZ7Q3nt9wwmmHdG5bYj9ebzAiOrrKhemaoMuNdvim8WK7BQVUK6wn2JmNXeKDNcuqTR2OK65KKHS-3u3UwUDXW-UFD2HeCAfNcNAIh81w2AhHzXDUCLMTeLH7718AAAD__8h-zLQ=
diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_explain_local b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_explain_local
index c2944ca9dded..f56d1b9e6a6d 100644
--- a/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_explain_local
+++ b/pkg/sql/logictest/testdata/logic_test/inverted_filter_geospatial_explain_local
@@ -17,12 +17,12 @@ CREATE TABLE geo_table2(
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT k FROM geo_table2 WHERE ST_Intersects('POINT(3.0 3.0)'::geometry, geom)]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk9uO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yffscgpPPobT5JrN_ntY-7NL-_x8Ij5u3cXF_VBhnnD38Xg0f7C_E3TmKgv5B_Enlwy7KZ-hKox0e6T51MtunFFCtsR1WZ7Z2hVNrVk2bdjtpuCag0Pk2y9tNottULfAuzM_CwXk4OAuH5-HwLDy8B6f7Z38DAAD__-v9pS4=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT k, k_plus_one FROM geo_table2 WHERE ST_Intersects('POINT(3.0 3.0)'::geometry, geom)]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk11v0zAUhu_5Fda5aSuZ1U5AIF-FjwyCura0lQDNURXqQ4mW2sF2UFDV_46SDG3dlI72wtL5eOzzvj3Zg_tVgIBlPInfrUhlC3K5mF2R6_jrfPImmZLh-2S5Wn6ejMhtyw0lN-uyqNzaaOyat2jWPvteYEC-fIwXMXF-nWuP1uHGu-FgPkumq2F4wUh4wUYDIT7Es6t4tfhGG3Q3SoGCNgqn2Q4diGvgkFIordmgc8Y2qX3bkKgaBKOQ67LyTTqlsDEWQezB575AELBqBllgptCOGVBQ6LO8aK-9mzNq3l3nWmENFJZlpp0gYwlvpax_KClrzqSs2VMHPD-X4RJIphUJGTH-J1oHFGaVFyTiNAppFEB6oGAqfyfQ-WyLIPiB_r8Jif6N1qO6zAuPFu2YHzvxrx7XpSVGkygQxDUuEOcz60WrKnz1UkoWMCkZe-oAglqdizVm9LvRb0VwjhWfTK5v1yHoXYfS5rvM_gEKnWPi4Qozzjh7_Hv94lE8EPf3OwpGR_9wr6bwHE0LdKXRDo_09N3MDikFVFvsviNnKrvBuTWb9pkunLVcm1DofFflXZDortQMeB_mJ-HgNBychMMHcHp49jcAAP__Crh0gQ==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUk99v0zAQx9_5K6x7aSuZ1UmKQH4KPzII6trSVgI0R1WojxIttYPtoKCq_ztKMti6KR3JgyWf7-P7-pu7A9ifOXBYRdPo7ZqUJieXy_kVuY6-LKav4xkZvotX69Wn6YjcptxQcrMp8tJutMI2eYd649JvOfrk84doGRHrNplyaCxunR0OFvN4th4GF4wEF2w04Px9NL-K1suvtEb3owQoKC1xlu7RAr8GDxIKhdFbtFabOnRoEmJZAWcUMlWUrg4nFLbaIPADuMzlCBzWtZAlphLNmAEFiS7N8ubaO51hXXeTKYkVUFgVqbKcjAW8EaL6LoWoPCZExZ5a4HlfxhNAUiVJwIh2P9BYoDAvHSehR8OAhj4kRwq6dHcPtC7dIXDvSP_fhFj9QuNQXma5Q4Nm7J068fc8qgpDtCKhz4mtXSDWpcbx5lXByxdCMJ8JwdhTCxBUsi9Wm9HtRrcVfh8rPupM3baD39kOhcn2qfl9Up6GQaeCoI-Cfz8hOK3fxvnDaWEe89jj79Xk0X7A749S6I9OmqlT_KSP-CXaQiuLJ9K7bmbHhALKHbYja3VptrgwetuUabfzhmsCEq1rT712E6v2qBZ4H_bOwv552D8LB-fh4Cw8eQAnx2d_AgAA__8CMKrn
query T
EXPLAIN SELECT k, k_plus_one FROM geo_table2 WHERE ST_Intersects('POINT(3.0 3.0)'::geometry, geom)
diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_filter_json_array_dist b/pkg/sql/logictest/testdata/logic_test/inverted_filter_json_array_dist
index a525554ef15d..2349175b125d 100644
--- a/pkg/sql/logictest/testdata/logic_test/inverted_filter_json_array_dist
+++ b/pkg/sql/logictest/testdata/logic_test/inverted_filter_json_array_dist
@@ -112,7 +112,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT a FROM json_tab WHERE b @> '[[1, 2]]' OR b @> '[[3, 4]]' ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU1Fv0zAQfudXnO5lGxglTipN8lM2lolOpS1JJUBthNzmGEGZHWxnKqr631GSDuhYo_Yhls_f9_k-3102aH-WKDCNR_G7GdSmhNtk8gHm8efp6Go4hvObYTpLP44uYEeRHeGH1eqrk0v49D5OYjhfQrSofT8kOJvPOYMgy84uYJI8Q0IGgx1yEydw_QVkh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DcDgMh4PwaBgeDcKnL-Bs89_vAAAA__9Mybuj
# Combine predicates with OR.
query T
@@ -126,7 +126,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT * FROM json_tab WHERE b @> '[3]' OR b @> '[[1, 2]]' ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU1Fv0zAQfudXnO5l3TBKnAyQ_JSNZaJTaUtSCVAbIbc5RlBmB9uZiqr-d5RkLQTUQl-iu_u-z_edfdmg_V6iwDQexW9mUJsSbpPJO5jHH6ejq-EYBjfDdJa-H53DE-WiI3yzWn12cgkf3sZJDIMlRIva90OCs3mYnZ3DJOkX55xBkHXITZzA9SeQGTJUOqexfCCLYo4cM4aV0SuyVpumtGkJw3yNwmdYqKp2TTljuNKGUGzQFa4kFDiTy5ISkjkZz0eGOTlZlO2xO7NRGxTqERmmlVRWgMd978oYL3yxj7ypoS_FOlY5SJXDS9DuKxmLDCe1ExBxFgWYbRnq2v2yY528JxR8y_7f8lA9knGU3xalI0PG433fOzxeVwa0gogLsI1vsE4aJxb4erHwfb_5hPuIXzTfV12OQCr_N5EvENppg7-mPThqcMqod7pQT48THHicyhQP0vzo3TOLwoP9w1P6p9o4Ml7Y7x3x58iwu34Bgyjob7EQ4i6djK-7be6hu3XeUw7avDzFZkK20spSz-ahk_1txpDye-p-FKtrs6Kp0au2TZdOWl1byMm6DuVdMlQd1Bj8XcyPioPj4uCoODwuDo-KL_8QZ9tnPwMAAP__LFd8qQ==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUU91u00wQvf-eYjQ3_fkW2WunIO2VW-qKVCEJdiRAiYWceChG7q7ZXVdBUd4d2W4CBtmQm9X8nTlndjQ7NN8KFBiHk_D1AipdwF00ewvL8MN8cj2ewvntOF7E7yYX8Fxy2RZ8NUp-suka3r8JoxDO1xCsKtf1Cc6WfnJ2AbOoG1xyBl7SZm7DCG4-QpogQ6kymqaPZFAskWPCsNRqQ8YoXYd2TcE426JwGeayrGwdThhulCYUO7S5LQgFLtJ1QRGlGWnHRYYZ2TQvmrYHsUFj5PIJGcZlKo0Ah7vOtdaO_-JoOXNNn_NtKDNIZQZXoOwX0gYZziorIOAs8DDZM1SV_SnH2PSBUPA9-3fJY_lE2lJ2lxeWNGmHd3Uf8uG21KAkBFyAqXWDsam2YoWvVivXdevHP1r8sn5ftj4CyezvhXyF0Ezr_TFt76jeKaPeq1w-L8frWU6p88dUf-_8Mwv8Xn7_FP5YaUva8bvcAf-_t_3olPbHDY66BG1cwHngdQ9ECHEfz6Y37aF0sodLOZb0Srw6RWJEplTSUEdgX2d3nzCk7IHaGzSq0huaa7VpaFp31uCaQEbGtlneOmPZpmqBv4L5INgbBnuDYH8Y7A-CR8Pg0SD46jdwsv_vRwAAAP__eUGvYw==
# More complex combination.
query T
@@ -142,7 +142,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT a FROM json_tab WHERE b @> '[1]' AND a % 2 = 0 ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8k2GL004Qxt__P8Uw8OdS3CPZpIIsCKk2h4Ga1qSgUoNsm_GIxGzc3cjB0e8uSerZSo09X_husjPP8-z82Nyj-VqhwCxaRC_X0OoKbtLla9hE71aLWZyAM4-zdfZmMYHDiBwGPhtVf7RyC29fRWkEzhbCD63nBQRXG55fTWCWzMFxJPwP_gSegzeBZTqPUnjxHmSODGtVUCK_kEGxQY4MfWQYYM6w0WpHxijdte77wbi4Q-ExLOumtcOxLW1FKFDpgjQVyLAgK8uq9wv5E8z3OcOd0oTi53SirlXjTk-m8z1D1dqDc87QWHlLKII9O0rnR-lnjNdyW1FKsiDteqeX-YEq7Iuy_oYMs0bWRoDLPXemtcuvHyp3pelTeRfV3Uo3ZWVJC3BC3oEUQsTJ-lnP81Ajw2VrBYQcf7cHf8wemdKWtOuf43ne3j-x9y_HxC_H5D9g8v8Rpj_sccAU_C0mb9w-JdOo2tBF79TrHjoVtzT8GEa1ekcrrXZ9zPC57HX9QUHGDt2nw0dcD63ugsdiPir2x8X-qNg7EfNfxcGoeDqePH1Ucr7_73sAAAD___l6lEw=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJy0k--K00AUxb_7FJcLsi3OkkzSVhkQWm0WC7WtaUGlBpk21yUSM3VmIgtL312a1NpId7ZV_DZ_7u-ckxzmHs33HAXOo3H0egGlzuEmnr6FZfRhNh6MJtAajuaL-btxG_Yjsh74alTx2coVvH8TxRG0VtD_VPp-SHC15MlVGwaTIbRaEp5C0IaX4LdhGg-jGF59BJkgw0KlNJHfyKBYIkeGATIMMWG40WpNxii9u7qvBkfpHQqfYVZsSlsf28zmhAKVTklTigxTsjLLK70-f4bJNmG4VppQ_J6eqGu18XqN6WTLUJV2r5wwNFbeEorOlh258yP3E8ILucopJpmS9vxmmF-_ql8tsuIHMpxvZGEEeNz3Blp7_Pqw8maavmR3UbH7pGlpBfQ5PhSRXxLxJsstadJe0MxXnwto9fmuLSHEaLJ4UZW2Xz_oH1ziP1fakvY6p6o6LR825IPzG-DnNxAcGgj-vYFHIh4aCP9TA4_47xvo_m0Dvls-JrNRhaGzXpe_e56U3lL9nI0q9ZpmWq0rm3o7rbjqICVj69vn9WZU1Fe7gMcwd8KBGw6ccOiGQyfsN2D-J9xxwl23c9cJ99xw76LYyfbJzwAAAP__jDL5yA==
# The split disjunction rule allows us to use the index for this query.
query T
@@ -156,7 +156,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT a FROM json_tab WHERE b @> '[1]' OR sqrt(a::decimal) = 2 ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkN9ro0AQx9_vrxjmJQb2OM29DRyYH4bzMDGngbakUjY6BItxze4KLcH_vURb0jwU-vj9sbPzmTOaU4WEaRAF8y20uoJlEq9gF9xvomm4BmcRptv0fzSG94ocCs9G1U9W7uHub5AE4OzBf2xd9zfDaOdlozHECTjmpK0jiRbBPFxNozH8gcklWQQJzB5AZiiwVgWv5ZEN0g49zAQ2WuVsjNIX69wXwuIFyRVY1k1rL3YmMFeakc5oS1sxEm7lvuKEZcH6l4sCC7ayrPqxH8v6jS6PUr-iwLSRtSH4iQKXZWVZEzj-5BaCiP6l8Xr2Ccb3bmnoKlFg3FoC38OsE6hae93VWHlgJK8T3-dJ2DSqNnyD8tVkt8sEcnHg4WZGtTrnjVZ5_80g4_5dbxRs7JB6gwjrIeqy7sdbAAAA___ZnaL-
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkd3qm0AQxe_7FMPc_A1siWvvFgrmw1CLiakG2pJK2egQLMY1uyu0BN-9qC2JhZT2cs6cs_Pj7A3NtUKBaRAFqwO0uoJNEm_hGHzaR4twB846TA_ph2gGvyxyNHwzqv5q5Qk-vguSAJwT-F9a131D8HLk2csM4gQcc9XWkUKsg1W4XUQzeAtev1kHCSw_g8yQYa0K2skLGRRH5JgxbLTKyRile-k2GMLiOwqXYVk3re3ljGGuNKG4oS1tRSjwIE8VJSQL0nMXGRZkZVkNz_6G9RtdXqT-gQzTRtZGwGtkGLdWgM-Z72HWMVStvR8xVp4JBe_Yv4NsysqSJj3nU4pRF-D43rQsIcT7NN4tH0rz-bQ1cR_vxE9xvf_BTcg0qjY0gX32sttlDKk40_g3RrU6p71W-XBmHOMhNwgFGTtu-TiE9bjqAR_D_K9h749w1r36GQAA___a4Ni9
statement ok
INSERT INTO array_tab VALUES
@@ -195,7 +195,7 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT a FROM array_tab WHERE b @> '{1}' AND a % 2 = 0 ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy0kmGL004Qxt__P8Uw8OdS3KO7SQVZEHLaHAZqeiYFlTMc22Y4AjEbdzeilHx3SVK01TP2BN-E7M48zzP7Y_ZoP1UoMYtW0csNtKaC63T9Gm6jdzerqzgBbxlnm-zNagaHFjU2KGPU1zuntvD2VZRG4G0h_NByHhBc7EV3MYOrZAmep-B_8GfwHPgM1ukySuHFe1A5Mqx1QYn6SBblLQpk6CPDAHOGjdE7slabvrQfGuPiC0rOsKyb1o3XrnQVoURtCjJUIMOCnCqrwS8UTzDvcoY7bQjlj-5EX-pmvjjpzjuGunUH55yhdeqeUAYdO0oXR-kPGG_UtqKUVEFmzk-H-c4qVMbclfVnZJg1qrYS5oLPxWX_7V9_XVaOjAQvFD02KWWcbJ4N9A7_yHDdOgmhwN9NLR4zdaaNIzOE_0LvYXv_xN4_H4o4H4o_QPH_GZQ_TH2AEvwtFD5tn5JtdG3prB3k_RJTcU_j0lvdmh3dGL0bYsbjetANFwVZN1afjoe4Hkv9gMdiMSn2p8X-pJifiMXP4mBSvJhOXjwqOe_--xYAAP__gwyIGw==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJy0k-Fq2zAUhf_vKS4XRhOmEstOsiEYpFtcFsiSzg5sozNFiS_F4FmeJI-N4HcftkOXjFRNCvsTIul-5xwfoS2aHzkKjMN5-H4Flc7hOlp-hNvwy838araA3nQWr-JP8z7sRmQ3ILWWv--sXMPnD2EUQm8Nk2-V5wUEF1teX_ThajGFXk_CS_D78Ba8PiyjaRjBu68gE2RYqJQW8jsZFLfIkaGPDANMGJZabcgYpZujbTs4S3-h8BhmRVnZbttmNicUqHRKmlJkmJKVWd7qTfgrTOqE4UZpQvF3eqEuVTkYH0wnNUNV2Z1ywtBYeU8ohjXbc-d77keEV3KdU0QyJT3wDsM8dDWRWt9lxU9kGJeyMAIG3Bvwy-a3-fplZQVMOD4WiJ8T6DrLLWnSrfJemm5fQG_Cm7sRQswWqzftFe3-P-rvn-MfK21JD4bHLua4fHAg75_eNz-9b7_t239O308Eeug7-E99P-G_63v03L49t3xEplSFoZNejtc8PUrvqXuqRlV6QzdabVqbbrlsuXYjJWO709fdYlZ0R03AfZg7Yd8N-044cMOBE_YOYP4vPHTCI7fzyAmP3fD4rNhJ_eJPAAAA___F9u2X
# The split disjunction rule allows us to use the index for this query.
query T
@@ -216,4 +216,4 @@ query T
SELECT url FROM [EXPLAIN (DISTSQL)
SELECT a FROM array_tab WHERE (b @> '{2}' AND a = 3) OR b[0] = a ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkV9rnEAUxd_7KS73JS5MyOi-lIGA266hwtZNZ4U2WCmjXoJgHDszQoP43Yt_2CaFbvN4zz3n6P3NgPZngwJP0SH6mEJvGriTx8-QRd_uD7s4AW8fn9LTl8MGVotaDMoY9fzDqQK-fopkBJ5XQPi953xLcDUE49UGdskePAW3sN1s4CjBKzKewy2oadpHEj48gMqRYasrStQTWRQZ-shwiznDzuiSrNVmkofZFFe_UHCGddv1bpJzhqU2hGJAV7uGUGCir3V3M7VU5FTdzLaRoe7dn5B16pFQBCN7UexfLk5V0ZAkVZG54a_q8Qwj7Ez9pMwzMjx1qrUCrpHhXd04MgI8LwzOkHZS7h6yQAgRJ-n7fMUV-hOvVVyxzVoYZPzsRYbH3gkIffzXaf6r0_7DTJLtdGvpTdD4mDOk6pGWd7G6NyXdG13On1nG45ybhYqsW7bBMsTtspp-8GXYvxjmf4Xz8d3vAAAA__9h9tbQ
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkVFr2zAUhd_3Ky73pQ6oRJZfhqDgbHGZIXM6JbAVzwwlvhSDa3mSDCvB_33YDmkzSLY93nPPuTroO6D7WaPETbJKPm6hszXcq_VnyJNvD6tFmkGwTDfbzZfVDI4WPRm0tfrlh9c7-PopUQkEwQ7i7x3nEcHNQfQ3M1hkSwg03EE0m8FaQbDLeQF3oIdpmSj48Ai6QIaNKSnTz-RQ5hgiwwgLhq01e3LO2EE-jKa0_IWSM6yatvODXDDcG0soD-grXxNKzMytaecCGZbkdVWPtp6h6fxryHn9RCijnr05HF4_vNW7mhTpkuycn53H02fEra2etX1BhptWN07CLTJcd15CHLJY4KUm4f80ua9qT5bsPDyvMekSgiAWJxgLpRaPuZBSptn2fXHEEocDl6N4xDNqscj5yfva_WJxcVb8L2wUudY0jv4JDu8LhlQ-0cTfmc7u6cGa_fjMNK7H3CiU5Py0jaYhbabVUPBtOLwaFtfD4mqY_xEu-ne_AwAA__8KtQyj
diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_index_geospatial b/pkg/sql/logictest/testdata/logic_test/inverted_index_geospatial
index 06774cebee48..d064b636b816 100644
--- a/pkg/sql/logictest/testdata/logic_test/inverted_index_geospatial
+++ b/pkg/sql/logictest/testdata/logic_test/inverted_index_geospatial
@@ -28,7 +28,7 @@ SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lN9v2jAQx9_3V5zupUXLhJ1kjHqaBG3TjY1CF9C2rkFVmtzaqMHObDNRVfzvUxJWUSro2MN4MLofX3P3uTP3aH7mKHAU9IOjMcx0Difh8BQugm9n_W5vAN1Bt3_-PYD9495oPPrcb8Ay9bZOvCZ1aeOrnODrhyAMwNjLTFrShhJr9vdGYe_4nds64O23Z8PeYLzvM8aYB9UX8xp7QrwPhqfBODx3yrumDRiGx0EIh-dwO0EHpUppEE_JoLhAjhMHC60SMkbp0nVfJfTSOQrmYCaLmS3dEwcTpQnFPdrM5oQCx2WRIcUp6SZDB1OycZZX1z700CkruMxkSnN0cFTE0ghoRngYRfMfaRTNOYuiOXvuwFe7aniEEMsUPAbK3pA26OCnL2CzKQlgSytR0pK0mZJrATsrcjKgKU4F-LXv6s4-uDwXDtHBZZqa2WJmy8TJwsHaWjIzNr4mFHzh_D3XnvxF2lJ6kuWWNOkmfwz3TzyYFxqUhA4XYEqyYGysrahIeW9eRxFzWRQx9tyBQDLdVVYCfkJ4WGLolPVWDS451ghrj7Fxnq_SnsZzmNJU6TuI81wlsaVUAKv4ljGT6NgmN5Bm5vZpxtoE3I0TcHeZwEeVyeViu5sWu9DZNNZ36GA9J7H-UBlnvHySLnNbrQO2-jlqdXnb57XRZm3e9v3A53ti9e123MYWou5mov-45u4uOL1dcI6UtqSb3mOUHf5yl67-0574uzQWkimUNPSosU03s8XEQUqvqf6XNWqmEzrTKql-pjaHla5ypGRsHeW10ZN1qCxwVcy3it3tYner2Nsu9raK_TXxZPHidwAAAP__wYU-dw==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJy8VVFP20gQfr9fMZoXiM6n7NomF_Z0UgKYu9yFhDpRW4ojZOwpWDhed3dTBaH898p2SpOgGNyH-mGt-Wa-9XzfjtZPqL-kKHDiDb3TKSxUCuf--AKuvY-Xw_5gBP1Rf3j1yYPDs8FkOnk3bMG69KEqvCN5Y8LblODDv57vgTY3SWZIaYqMPjyY-IOzv-3OMe_-dTkejKaHLmOMOVC-mNM6EOIfb3zhTf0rq9hr3oKxf-b5cHIFDzO0MJMxjcI5aRTXyHFmYa5kRFpLVUBPZcEgXqJgFiZZvjAFPLMwkopQPKFJTEoocFo06VMYk2oztDAmEyZpue2zhl7RwU2SxbRECyd5mGkB7QBPgmD5OQ6CJWdBsGSvLfhHUw4PEMIsBoeBNPekNFr4_3swyZwEsHUUycxQZhKZ7STMIk9Jg6IwFuBW2O2jeYYcG07QwnWZXJh8YYrC2crCKlp7pk14Ryj4ynq7r4PsKylD8XmSGlKk2nzb3O95b5krkBn0uABdOAvahMqI0innz6MgYDYLAsZeWxAoi5vSCoNfODwubOgV_ZYC1z5WFlaINmGabro9D5cwp7lUjxCmqYxCQ7EAVvpb5HSkQhPdQ5zoh5cVOydg7z0Bu8kJ_CeTbD3Y9r7BzlUyD9XjD9FWz36h296v-yeH0W4i2mki-nncnG3JFS527yHGGS9uHJvZnc4x23xOO33edXkVdFmXd13Xc_mB2LyaenarZmBqjHuzereJ-olUhlTb3dbe4783ae0XzfJRE2E-6VxmmraE7duZrWYWUnxH1Z9Ay4WK6FLJqPxMFY5LXgnEpE2V5VUwyKpU0eAmmdeS7XqyXUt26slOLdmtJ7u15KMd8mz127cAAAD__yskiEE=
statement ok
DROP TABLE geo_table
@@ -64,7 +64,7 @@ SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlG9P2z4Qx5__XsXpnkD1y1Q76briaVILhK1baVlabWOkQiG5QURqZ7Y7FaG-98lJhwqIjm5PlgeO7s_Xufv4nFs03wsUOA4H4cEE5rqAo2h0DGfhl5NBrz-E3rA3OP0awu5hfzwZfxw0YJV6XSdekjq3yUVB8PldGIVg7HkuLWlDqTW7O-Oof_jGb-_xzuuTUX842W0xxlgA1YsFjR0h3oaj43ASnXpur1kDRtFhGMH-KVxP0UOpMhomMzIozpDj1MNSq5SMUdq5bquEfrZAwTzMZTm3zj31MFWaUNyizW1BKHDiiowoyUg3GXqYkU3yotr2roeuq-A8lxkt0MNxmUgjoBnjfhwvvmVxvGCBW9hvFnyxrYbHCInMIGCg7BVpgx5--AQ2n5EAtrJSJS1Jmyv5IGDnZUEGNCWZAL_2XdzYOxdvwz56uEpTc1vOrUucLj2srRUzY5NLQsGX3vO59uUP0payo7ywpEk3-X24v-LhotSgJHS5AOPIgrGJtqIiFbx6GcfMkWIOyMYFgWS2rcwBfkR45DB0Xb1VgyuONcLaY2xSFOu0Z8kCZjRT-gaSolBpYikTwCq-LmZSndj0CrLcXD_OePYJ-NucwHuVy9Vg-08NdqnzWaJv0MP6nMTDi8o44-5K-sxvt_fY-nPQ7vFOi9dGh3V4p9UKW3xHrN_drt_4M6J_MebPxhlsg3OstCXdDO6j7PL__8E5aW3TWESmVNLQvcae2pktpx5Sdkn1X9aouU7pRKu0-kxtjipd5cjI2DrKa6Mv65ArcF3MN4r9zWJ_ozjYLA42ilsPxNPlfz8DAAD__88yPnk=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzMVVFP40YQfu-vGM0LRHWVXdukYatKCWDatCGhTtSWwxEy9hxYOF7f7uYUhPLfT2vnuASEL7l7OT-sNd_Mt57v29H6CfWHHAVOgmFwOoWFyuE8HF_AdfD_5bA_GEF_1B9evQvg8GwwmU7-GbZgXfpQF96RvDHxbU7w359BGIA2N1lhSGlKjD48mISDs9_dzjHv_nY5Hoymhz5jjHlQvZjXOhDij2B8EUzDK8fuNW_BODwLQji5gocZOljIlEbxnDSKa-Q4c7BUMiGtpbLQU1UwSJcomINZUS6MhWcOJlIRiic0mckJBU5tkyHFKak2QwdTMnGWV9s-a-jZDm6yIqUlOjgp40ILaEd4EkXL92kULZlnF_aVBX_Zl8MjhLhIwWMgzT0pjQ7-_S-YbE4C2DpKZGGoMJksXiTMosxJg6I4FeDW2O2jeYZ4B07QwXWZXJhyYWzhbOVgHa090ya-IxR85ezu66D4SMpQep7lhhSpNt8293M-WJYKZAE9LkBbZ0GbWBlROeX9ehRFzDrFrCGNCwIV6b40a_Arh8fWhp7ttxK49rG2sEa0ifN80-15vIQ5zaV6hDjPZRIbSgWwyl-b04mKTXIPaaYfXlfsfALuPifwl8yK9WC7bw12qbJ5rB6_iHZ67j66v2MYdxbt7SP6edy8bck1Ll7eQ4wzbm8cl7mdzjHbfE47fd71eR10WZd3fT_w-YHYvJp6buvbBmZn9f4-6idSGVJtf1t7j__8A87y0T7CQtKlLDRtCXtrZ7aaOUjpHdV_Ai0XKqFLJZPqM3U4rngVkJI2dZbXwaCoU7bBTTJvJLvNZLeR7DWTvUay30z2G8lHL8iz1U-fAgAA__86k4hD
# Also works when creating an index.
statement ok
@@ -76,4 +76,4 @@ CREATE INVERTED INDEX geom_index ON geo_table(geom)
query T
SELECT url FROM [EXPLAIN ANALYZE SELECT k FROM geo_table WHERE ST_Intersects('SRID=26918;POINT(400003 4000003)'::geometry, geom) ORDER BY k]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlG9P2z4Qx5__XsXpnkD1y1Q76briaVILhK1baVlabWOkQiG5QURqZ7Y7FaG-98l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US6MhWcOJlIRiic0mckJBU5tkyHFKak2QwdTMnGWV9s-a-jZDm6yIqUlOjgp40ILaEd4EkXL92kULZlnF_aVBX_Zl8MjhLhIwWMgzT0pjQ7-_S-YbE4C2DpKZGGoMJksXiTMosxJg6I4FeDW2O2jeYZ4B07QwXWZXJhyYWzhbOVgHa090ya-IxR85ezu66D4SMpQep7lhhSpNt8293M-WJYKZAE9LkBbZ0GbWBlROeX9ehRFzDrFrCGNCwIV6b40a_Arh8fWhp7ttxK49rG2sEa0ifN80-15vIQ5zaV6hDjPZRIbSgWwyl-b04mKTXIPaaYfXlfsfALuPifwl8yK9WC7bw12qbJ5rB6_iHZ67j66v2MYdxbt7SP6edy8bck1Ll7eQ4wzbm8cl7mdzjHbfE47fd71eR10WZd3fT_w-YHYvJp6buvbBmZn9f4-6idSGVJtf1t7j__8A87y0T7CQtKlLDRtCXtrZ7aaOUjpHdV_Ai0XKqFLJZPqM3U4rngVkJI2dZbXwaCoU7bBTTJvJLvNZLeR7DWTvUay30z2G8lHL8iz1U-fAgAA__86k4hD
diff --git a/pkg/sql/logictest/testdata/logic_test/inverted_join_json_array_dist b/pkg/sql/logictest/testdata/logic_test/inverted_join_json_array_dist
index 0cb5294144a6..258c2f324184 100644
--- a/pkg/sql/logictest/testdata/logic_test/inverted_join_json_array_dist
+++ b/pkg/sql/logictest/testdata/logic_test/inverted_join_json_array_dist
@@ -99,7 +99,7 @@ SELECT * FROM json_tab@primary AS j1, json_tab AS j2
WHERE j1.b @> j2.b AND j1.b @> '{"a": {}}' AND j2.a < 20
ORDER BY j1.a, j2.a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy0U2Fv2jAQ_b5fcbp9KKyGxA7tNH8KHalKxUiXIG1TiSZDrC4ojZmdSJsQ_31K2OiCgJFV_ejze_fe8_lWaL6nyDH0Rt77CRQ6hevA_wD33ue7UX84htZgGE7Cj6M2_Ia82QAWRmVfczFzlzp5FPon9ENYULKtV2cGn268wINWa0G7M3CnhW07Eh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epNP_-km0_Y-2K19oOZxSxP24NcmnP2357ylC1_ohUy12HzWWyubxVsW0aOo_g1a5mom7pWclZjq6JW6MhAJnVW3VnUYpuVVua2_i0mjmNbE5qaYdiDTTbHVKLabyXajmJjN6pOXOHbaKD5rJp-9xLHzRvGgmTzoRA5Xr34EAAD__xvX5qg=
# This query performs a left inverted join with an additional filter.
query T
@@ -185,7 +185,7 @@ SELECT * FROM array_tab@primary AS a1, array_tab AS a2
WHERE a1.b @> a2.b AND a1.b @> '{1}' AND a2.a < 5
ORDER BY a1.a, a2.a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy0UmGP0kAQ_e6vmIwf7vD2aLctxuynovRyGISzJdELNmahk7NJr8XdbeKF8N9Ni4JFQKrx487Mm_fe7Fuh_pqhwCgYBW-mUKoMbsLJO5gFH-9G_eEYLgfDaBq9H3Xgx8iLzYBUSj59NnLuL1X6KNUT9COQnO0adcGBD7dBGMDlpeTdOfifStt2CaTTnXegPx5As36x4uuLzs-O05VQNxbQ68AkHAQhvL4HybuSVStkjAzzIqGxfCSNYoYcGboYM1yqYkFaF6oqr-qhYfINhc0wzZelqcoxw0WhCMUKTWoyQoFTOc8oJJmQsmxkmJCRaVav_s0wMoyWMtcCri0X4zXDojS71drIB0LB1-zv6J1W9Axv0syQEuA722v2w7B_P-NCiOF4-io-qtE5qnEnrcwLlZCipCErrpB_Gjlg9FbqL2-LNCdleU2fkzH43taBX11hUhoBPme-w3yX-d5RH26bW0eFMqSsXpPed6-Yz6-2rBUfq7mPsnoNVn7-D_Ozf9hyry3Pen5myFpIcNtI-F8hO6AxJL0sck37YTu42a4SRskDbRKri1It6E4Vi5pm85zUuLqQkDabrrN5DPO6VR_xVzBvAXb2wc5JsNsA2_tg9yT45Wmw9y-ee608x-tn3wMAAP__GED9SQ==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJy8k1GPk0AQx9_9FJPx4a7eXmGBXi_7RLVcrqa2JzTRSyVmWyYnCQd1gcRL0-9uAG2ltlxR4-POzH9-O7P_XWP6NUKBnjN23swgVxHcuNN3MHc-3o0HowmcD0fezHs_7sCPkldVgVRKPn3O5MJeqfBRqicYeCA52yXKgAEfbh3XgfNzybsLsD_lum4SSKO76MBgMoR6_GzNN2ednxmjK6FMLKHXgak7dFx4fQ-SdyUrWkgfGcZJQBP5SCmKOXJkaKLPcKWSJaVpoorwuiwaBd9Q6AzDeJVnRdhnuEwUoVhjFmYRocCZXETkkgxIaToyDCiTYVS2_m1gZOitZJwKuNRM9DcMkzzbtU4z-UAo-Ib9Gd74J3ijDf4mjDJSpDSrzq7iAmxj-1AD1x3cz7kQYjSZXftH-eZR_g6bx4kKSFFQo_qF8rmSA0PcyvTL2ySMSWlX9TGmE7Ct7QR2seBpngmwObMNZpvMto7OYbXZo5eojJTWr-Nt84LZ_GJLLXisZB-l9mpUfrp5-Mnm0cxLzdJenujfFlcw21zhRP8-g9_6t_cf_HuA71K6SuKU9n18sLNemJeCB6o-Q5rkakl3KlmWmOo4LXVlIKA0q7JmdRjFZap8n1_FvFFs1MT6vthoQTb2xWaj2GomW43i62Zx728WdtUo7jeT-60W5m9efA8AAP__VGJi2w==
# This query performs a left inverted join with an additional filter.
query T
diff --git a/pkg/sql/logictest/testdata/logic_test/tpch_vec b/pkg/sql/logictest/testdata/logic_test/tpch_vec
index 3558de3d690d..f84b6fa30037 100644
--- a/pkg/sql/logictest/testdata/logic_test/tpch_vec
+++ b/pkg/sql/logictest/testdata/logic_test/tpch_vec
@@ -631,8 +631,12 @@ EXPLAIN (VEC) SELECT sum(l_extendedprice * l_discount) AS revenue FROM lineitem
â”” Node 1
â”” *colexec.orderedAggregator
â”” *colexec.distinctChainOps
- â”” *rowexec.joinReader
- â”” *colfetcher.ColBatchScan
+ â”” *colexec.projMultFloat64Float64Op
+ â”” *colexec.selLTFloat64Float64ConstOp
+ â”” *colexec.selLEFloat64Float64ConstOp
+ â”” *colexec.selGEFloat64Float64ConstOp
+ â”” *rowexec.joinReader
+ â”” *colfetcher.ColBatchScan
# Query 7
query T
@@ -775,8 +779,11 @@ EXPLAIN (VEC) SELECT l_shipmode, sum(CASE WHEN o_orderpriority = '1-URGENT' or o
â”” *colexec.sortOp
â”” *colexec.hashAggregator
â”” *rowexec.joinReader
- â”” *rowexec.joinReader
- â”” *colfetcher.ColBatchScan
+ â”” *colexec.selLTInt64Int64Op
+ â”” *colexec.selLTInt64Int64Op
+ â”” *colexec.selectInOpBytes
+ â”” *rowexec.joinReader
+ â”” *colfetcher.ColBatchScan
# Query 13
query T
diff --git a/pkg/sql/logictest/testdata/logic_test/vectorize_local b/pkg/sql/logictest/testdata/logic_test/vectorize_local
index 195d62682de0..486400a18624 100644
--- a/pkg/sql/logictest/testdata/logic_test/vectorize_local
+++ b/pkg/sql/logictest/testdata/logic_test/vectorize_local
@@ -104,7 +104,9 @@ EXPLAIN (VEC) SELECT stddev(0) FROM t46123 WHERE ('' COLLATE en)::BOOL
â”” Node 1
â”” *colexec.orderedAggregator
â”” *colexec.distinctChainOps
- â”” *rowexec.tableReader
+ â”” *colexec.constInt64Op
+ â”” *rowexec.filtererProcessor
+ â”” *colfetcher.ColBatchScan
# Regression test for #46122 (checking that we gracefully fallback to row
# execution on cross joins).
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg
index 56bda2e562e6..093d2d3408b7 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg
+++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_agg
@@ -128,7 +128,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lF-L2kAUxd_7KYb7ZGAkTh
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT max(a), min(b) FROM data HAVING min(b) > 2]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyslF2L2kAUhu_7K4ZzpTCSzCS67lxFWrcN-LFVKQvbXMyagw3EjJ1MYIv434um3Y2yTgLxMpN587w8J5w95L9TELAcT8afV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-Y6I8GbW-CNLPCe47W1UFPqzMLtdSx4zS14jSx4Pcdva6Gm1JmFwXUs-M0t-I0s-D2n39ZCTakzC8PrL8k3gAvMdyrL8dWyfPuX3eMSxXiD5cbNVaHXeK_V-oQpP-en3OkgxtyUt6z8CLPy6ljwPMysYV4Js9dhbg17drJnr83tad-a7tvD_TZ_-sYavrWTb9uQB9bw0E4etiGzmhmrG7L3TVl0-PA7AAD__0wdMxs=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT DISTINCT (a) FROM data]
@@ -148,12 +148,12 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyslFFr2zAUhd_3K8R9WkDBke
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT DISTINCT a, b FROM data WHERE (a + b + c::INT) = 27 ORDER BY a,b]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ll9r2zwUh-_fT3E4VylRcCQ7aWp4wVubskCXdElgGyUXSixaQ2pnkgIrJd992B5J0z-SO7m-lO1H-h09h4MfUf1aY4iz4dXwfA5buYbL6eQr3Ax_XF99Go2hdTGazWffrk7g7yf5ejQ-nwMnsCw_jrnm8P3LcDqEVotDG5Yn0IZVGI7G88EJ_A_sFCbTi-EUPv8ssAUSTLNYjPm9UBjeIEWCDAn6SDBAgj1cENzIbCWUymT-yWMBjOLfGHYJJulmq_PHC4KrTAoMH1Enei0wxDlfrsVU8FhIr4sEY6F5si6OyYNGG5ncc_mABGcbnqoQOh4FnsZAIdN3QiLBy2SthQyh1YootCFieT2R_7SgsFwgwclWhxBREjFc7AhmW33IpjS_FRjSHame_yJROklX2usdhy-PIDiRsZAifv3MwzbLB7jj6u61PRa7QzT2ZrTDVll54vOt2iRi7XKzN2ug3X8o4pDO_5B046yTbTx6fL9vRQiOItDqvUer9J5HOx5rtPssFezN9ZvvPlp799Eau49VV88qqWcdz29UvaWC_bWdNq-e1a6e1ajer67er6Te73hBo-otFeyvbdC8er929X6N6oPq6oNK6oOO12tUvaWC_bWdNa8-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UhzN_C9h7Mz4O7l8BcXES3L6FF00zbxgt3zLBjbovoumWk22a4bYQ7ZrhziShmmBDFDFOiEDQhipmmROleIkrPPBOaxFAgRgo1U46Gyjl1EzTRN0FThVM40TiBU5Xzo9FyTufcPFq4Q7RmHi68ReBH0-Ws0s00VbqZJksncKp0M06Wbp6sVOlHQ2a_tS7RmnnK8B6BH82Zs0o301TpZposncCp0s04VbowT9jD0meb__4EAAD__-XngIo=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT DISTINCT a, b FROM data WHERE (a + b + c::INT) = 27 ORDER BY b,a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8ltFr4koUxt_vX3E4TxZH4kxitYELube1rNDVrgq7S_FhNEMrWONORthS_N8Xzao16pykhjxG882c830_PvKO8a8Z-jhoP7Rvh7DUM7jv977CU_vH48N_nS5U7jqD4eDbwxX8fWX93OneDkEyGCcvh9JI-P6l3W9DpSKhCuMrqMLE9zvdYesK_gXRhF7_rt2H_3_CmIEcIcN5FKqufFUx-k_IkaFAhi4y9JBhA0cMFzqaqDiO9PqV942gE_5Gv85wOl8szfrnEcNJpBX672imZqbQx6Ecz1RfyVBpp44MQ2XkdLa5Zj1osNDTV6nfkOFgIeexDzWHg5yHwCEyL0ojw_vpzCjtQ6UScKhCINb7BO7HhfzkARn2lsaHgLNA4GjFMFqa_Wyxkc8Kfb5i2ee_m8ZmOp8Yp3E4fHIFw54OlVbh6Tv3x4zf4EXGL6fOGK32o4mzo-2PipIb00dVWSCqyWFnd-D1Tyyxn87NY9wg0kZph6d9E1UW8OrZO7xPO7A7-MQw3agWLRxxuP65ERoHI_DsfPMsfDu85ohSCSc22NFxXT7hvHDCeYGEE8ZtCU_7lotwkR0vkQkvUXPcUvEiNthF0ywfL1E4XqJAvAjjtnilfcuFl5sdLzcTXm7N8UrFi9hgF02rfLzcwvFyC8SLMG6LV9q3XHh52fHyMuHl1ZxGqXgRG-yiuSkfL69wvLwC8SKM2-KV9u3Tn38n7uireB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czi0XylZ2lK1MKFsNwy4BZcLXEeVulSgTphIKrOpRtkpHuVsiykRyB5TTuX34c_3MjJEM18EqlJm-wpu7aKT_KOM4w2Cj5vJeBfP9mPhyuNftf_BlGMX_8viiv4r_2hl8K-ZasdCLRVrM34rNEzHPJ-4WEXOrkLrQbEHMNrWBW_rALa3Y1k-29a-6pR_d0qrbenFbK-7oxZ0ilOnFxJvWiynKCHWh2RRlXX0nNIlS0FcKwRnXdwonSoW_269TuUnI3y1YHlwINfHOCDUFDCUvNp1ChuvLhdtE7vp6oZjR1wsn-oXrC4YTDcMLVQyhpt5asZKh5MWmk8zoe0YQPSMK9Ywgvl2ojxd9zwiiZ0ShniHU1BdIsZ6h5MWmU8wIfc8IomdEvp6Zbj_9CwAA___d-4ag
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT c, d, sum(a+c::INT) + avg(b+d) FROM data GROUP BY c, d]
@@ -174,12 +174,12 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkm-Pk0AQxt_7KSbzioa9lD
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT sum(a), sum(b), sum(c) FROM data GROUP BY d HAVING sum(a+b) > 10]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzUll1r4kAUhu_3VwznSulIcjKJbXMVt7Vdwcau2mVLV0o0gxVs4k4S2FL870uSUj-6O5MyCnqVzydz5jwvh7xC8nsOLgza3fbFkGRiTq76vRvy0P552211fFK77AyGg-_dOnl7Jcmea0GdFsfx23FSL6kwSANy3e_d3ZKv9yQk31o_Ov51iZATMq6TX5lpMk7QHAGFKA65HzzzBNwHQKBgAQUGFGyg4MCIwkLEE54kschfeS2ATvgHXJPCLFpkaX57RGESCw7uK6SzdM7BhWEwnvM-D0IuDBMohDwNZvNimbxEbyFmz4F4AQqDRRAlLmkYSIIoJEji9IkLoNDnUciFSzw88SxKPKSkODJKPBtGSwpxlq4qSNJgysHFJa1eZWs6FXwapLEwnM0ivfy65d8_-r3ho3_X7dY8p55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MruUaruMa8f-MYA25X60hIITVWmH_2wCaOlQNr2_ZN72f_vjsACqM4shMeHIMqaDDPO8xh0Ag2GtcLb35f29qrzcrvF1Zmv2isofEL7Bikzx2cmte5Y9g5dwyrfscgBuQ7plnBjuHlqeWlqOUNzbgAtUifO5a2rpNafk5qefXUIgbk1LYqoNYoT61RilqjoZkXoBbpc8fS9nVSa5yTWqN6ahEDcmrbFVBrlqfWLEWt2dCsC1CL9Lljaec6qTXPSa1ZPbWIATm1nYr_qb9pZizCTeCHotQfs54MW3hLkTkTBrFciAcZLNIy2eUo1aU3PBFG2VOWXfT97FHS4K6YFcVsV8z3xOw4cesUMWMnqa2T1B21misHbqgHbijFprqyqRRzxGtLqW6qxc1TQFGLEVDUYgwURI2AgqgRUFrKgbfVA2-fAkpHnQk6EgoHkXJUKqjVWCyo1WguIHIsGBA5Yjg7CJb9uXNk7upkQTxn6mhhJlL8IFyOMl2txkxXq1HTETlmOiLHTFfnKkOClR1kzFGmqzOGISHDDlLmKNPVasx0tRo1HZFjpiNyzHR1wnIkYbn6p61o-mz72_8BAAD__xhK5DQ=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT avg(a+b), c FROM data GROUP BY c, d HAVING c = d]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMll9r2zAUxd_3KcR9SqiCI8lJW0PBWdd2gdTp8meslFBUW6SB1MpkZ6yUfPdhpyxOskkuSsBvtqyf7rk6h4vfIPk5Bw-GV72ryxFaqjm6HvRv0cPVj7tepxug2pfucDT81quj9y3817TG0Ql6qmMUrjdHPOXoZtAf36HP9yjEKEJfO9-7wQ0K0QWKJoAhlpEI-ItIwHsAAhgoYGCAwQUMLZhgWCgZiiSRKtvylgPd6Dd4TQyzeLFMs-UJhlAqAd4bpLN0LsCDEX-ai4HgkVBOEzBEIuWzeV4mk-Uv1OyFq1fAMFzwOPFQwyGIxxEiSKbPQgGG69k8FcpDPkMXyM8EDUQc5SvkxKcY-Qxn65MVBrlMN1qSlE8Fe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FRi9bZzHoz1YliE9LWH1nGoTaV1r5G1-af8VUZGnn4G3tbFkk_3h6aiRlit0y7fy6O9xCnLFPW5YXFsKJxYtbO_9_dmnjbJa-QViaBrFYweIHtAiiY9ki5XO2CCJiPT0soy3CTtki5cy0CE8fU54qprxgiQNiiuhYxrRyzpgiItYd5BmNKT9lTCuZialIH1ORKqaiYNkHxBTRsYxp9ZwxRUSsOygyGlNxyphWMxNTO31M7VQxtQtW6YCYIjqWMa2dM6aIiHUH7YzG1D5lTGuZiSnyH0tbRZMwiFSqv3qLSdnKH6rFHUXhVA_UvQ4H82MWP1tzbr7gqyhevGWLH41g8SoRuA4zI8zNMN-G2TosNmC2H1w9Bmb8KLp8DM2LZloYL9w2w7bZLcTrkpEum-GyEa6Y4coxQTHDSFDMMBYUhEaCYqaxoFSPCUrNPBOKyFBARgo2U3aGyj52IzTiN0JjhmM44jiCY5azndGyj-fMPFqYjbhmHi6shOA702Uv0800ZrqZRk1HcMx0M46abp6smOk7Q2bTtSrimnnKsBqC78yZvUw305jpZho1HcEx0804Zjo3T9ht0_uzL_8CAAD__4qO2HI=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT sum(a+b), sum(a+b) FILTER (WHERE a < d), sum(a+b) FILTER (WHERE a = c) FROM data GROUP BY d]
@@ -207,7 +207,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyslNFq2zAUhu_3FOJcJSBjy3
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT max(t.a), min(t.b), avg(t.c) FROM (VALUES (1, 2, 3), (4, 5, 6), (7, 8, 0)) AS t(a, b, c) WHERE b > 3]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkF1r2zAUhu_3Kw7nSoJDajv7KLqK2dzNkKRdnHWFzheKfTAGxcokuRSC__uwPbZ10LHena_nfYTO6L8bVFhk6-z9Hnpn4Gp3vYH77O5mneZbEB_yYl98Xkv4eXLUjyIstCQ4tp0Ii4Mk0A-NCItKzqy4TddfsgJETJAQLCWBeE3whuDtWL4juCSIpIS0gABCExwIKglfP2W7DA7wrY-iJcOyRMLO1rzVR_ao7jHGkvDkbMXeWzeOztNBXj-iigjb7tSHcVwSVtYxqjOGNhhGhcZW2sCDNj17iC4iJKw56NZMyVetCewUrJJfdqVUvt1fYjkQ2j78TvZBN4wqHuj_7WnTOG50sO4ifmrepHdiFUsk3ORbsUrGKr39KFZL-aw6eYl6x_5kO89PtM8lR0NJyHXD8-d627uKb5ytJs3cXk_cNKjZh3kbz03ezavxgX_C8T_h5C-4HF79CAAA__8-tMoV
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkU1r20AQhu_9FcOcdmGw9dGPsCeLVmkFtpNabhpIdVhLgxDIWnd3FQLG_71ICm0TiEluM-_Mo0e7e0T3u0WFebpMP2-hty1cbq5WcJfeXi-TbA3iS5Zv8-9LCY8re_0g_ExLgn3TCT_bSQJ9Xws_K-XEiptk-SPNQYQEEUEsCcR7gg8EH4fyE8EFQSAlJDl4EJpgR1BK-Pkt3aSwg199EMQMcYGEnal4rffsUN1hiAXhwZqSnTN2iI7jQlY9oAoIm-7Q-yEuCEtjGdURfeNbRoWtKXUL97rt2UEwD5CwYq-bdtw_EZre_6Od1zWjCk_0esNl03q2bOfhk28_5goW0d-TKaWy9fYCX_JGb_EmdW251t7YefTUvEpuxSKUSLjK1mIRDVVy81UsYvmiOn6LesPuYDrHr7rM4FQQclXz9HDO9Lbka2vKUTO1VyM3BhU7P03Dqcm6aTT84P9weBaOzsPRWTh-Bhend38CAAD__31K_PM=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT * FROM (VALUES (1, '222'), (2, '444')) t1(a,b) JOIN (VALUES (1, 100.0), (3, 32.0)) t2(a,b) ON t1.a = t2.a]
@@ -220,12 +220,12 @@ CREATE TABLE nullables (a INT, b INT, c INT, PRIMARY KEY (a))
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT array_agg(a) FROM (SELECT a FROM data WHERE b = 1 AND c = 1.0 AND d = 1.0 ORDER BY a)]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlNFr2zAQxt_3V4h7spkyR7YzimBgr3E6Q5p0TmArxRQ1OryAa2WSAish__uwna7zWDaXvOTNn-4-3_e7h9uB-V4Ch0UyTS6XZKtLMsnm1-Qu-XozjdMZccbpYrn4PHXJoUVoLZ7uRVE4wm17nedKK6Wwgnz5lGQJcZwH8oEwl8SzMXFW9fe7oXuQ8iDJPBsnGfl4S4SbA4VKSZyJRzTA74ABBR8oBEAhBAojyClstFqhMUrXLbvGkMofwIcU1tVma-vnnMJKaQS-A7u2JQKHpXgoMUMhUXtDoCDRinXZjKkzRxu9fhT6CSgsNqIynAw8RkQlCSPKfkMNFCbr0qLmxHEiv47POU9ny4sDURS0SJzzyXQeLy-eUaPwV2GcXKbX8dQFCvOt5SRikO8pqK19CW6sKBA429MjcC9MSkvUKLs0EXsL-f4vG4iLQmMhrNLeqGuJsyy-vY-vrpyIuUcT-Z1ErP-6WZ91e2zg-eezcL8_nt8Lzx94wfngBf3xgl54wcALzwcv7I8X9sILB97ofPD-c-oyNBtVGeyQHfvzsD4VKAtsT4tRW73CG61WzZhWzhtf8yDR2LbKWpFWTakJ-LuZ_dP8vmMe_mn2T5kcnGIOTzGPXmXO929-BgAA__9NfD8a
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlVFvokAUhd_3V0zuE2THxQG0dpJNYCt2Sax20WS3aUgzlRvWhII7jMk2xv--QaxdTQWiL75x587hHL47GVaQ_0mAw8QbejdTspQJGQTjO_Lo_bofuv6IaH1_Mp38GOpku0VIKV6fRBxrQi_3am-dsoyEEuTndy_wiKY9k6-E6cQd9Yk2K56_tPVtGW1LMg76XkC-PRChh0AhzSIciRfMgT8CAwomULCAgg0UOhBSWMhshnmeyWLLaiPwo7_A2xTm6WKpiuWQwiyTCHwFaq4SBA5T8ZxggCJCabSBQoRKzJONTZHZWcj5i5CvQGGyEGnOSctgRKQRYSRTv1FCuKaQLdW7Q65EjMDZmjZPMZgnCiVKo7MfoVznRNMcsyDDOfdH094WlmOVtDjng-HYnfbeKDr2rtH3bvw7d6gDhfFSceKwo4nNo4nfg2YyQonRfkqHfYZw_cFnuXEsMRYqkwY7gOsGgfvw5N7eag7Tj0ay9iKx5qNkTUZpsJZhnjDMmhy7YXYvZphmc3JmI3Jmy7BOIFeTY0fu6mLIWc3JWY3IWS3DPoFcTY4dud7FkLObk7MbkbNbRucEcjU5duSuL4Zczc8iwHyRpTnu5T325nZxL2MUY3mP59lSzvBeZrONTVmON7rNQoS5KrusLPy0bBUB_xezSrG5J2aHYrPaucbaqlTb1WL7nNydSnG32rl7jvNVpbhX7dw7x_m6elbtmmNSfcgOvcP1p38BAAD__z91PZk=
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT json_agg(a) FROM (SELECT a FROM data WHERE b = 1 AND c = 1.0 AND d = 1.0 ORDER BY a)]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlNGL00AQxt_9K5Z5SnBrukkqx4KQeM2dkV5zpgWVIxx73SFWctm6uwWl9H-XJNUzYjXSl77l25kv8_3mYXZgvlTAYZHMkssl2eqKXOXZDblLPtzO4nROnGm6WC7ezVxyaPlsVH0vytIRbtfqHAqik1JYQd6_SfKEOM4DeUWYS-L5lDir5vvF2D1IeZAky6dJTl5_JMItgEKtJM7FIxrgd8CAgg8UAqAQAoUJFBQ2Wq3QGKWbll1rSOVX4GMK63qztc1zQWGlNALfgV3bCoHDUjxUmKOQqL0xUJBoxbpqxzSZo41ePwr9DSgsNqI2nIw8RkQtCSPKfkINFK7WlUXNieNEfhOfc57OlxcHoijokDjnV7MsXl78QI3Cn4VpcpnexDMXKGRby0nEoNhTUFv7FNxYUSJwtqdH4J6YlJaoUfZpIvYciv0fNhCXpcZSWKW9Sd_ydpHN7-Praydi7tFAfi8QG75tNmTbHht5_vns2x-O5w_C80decD54wXC8YBBeMPLC88ELh-OFg_DCkTc5H7x_XLoczUbVBntkx_48bi4FyhK7y2LUVq_wVqtVO6aTWetrHyQa21VZJ9K6LbUBfzWzv5pf9szj383-KZODU8zhKebJf5mL_bPvAQAA__9O9z5w
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlVFvmzAUhd_3K6z7BJozYiBtamkSrCEdUxo6EmmbKlS5wWKZKM5sR9oU5b9PhCxdogVQ8pI3rq8P5_Bdy6xA_cyBwiQYBbdTtJQ5GsbRPXoMvj6M_HCMjEE4mU4-j0y03fJDieKJZZnBzGqrsW2wqkyZZujLxyAOkGE8o_eImMgfD5AxK5_fdc1tmW5LFMWDIEYfviFmJoChECkfsxeugD4CAQw2YHAAgwsYepBgWEgx40oJWW5ZbQRh-gtoF8O8WCx1uZxgmAnJga5Az3XOgcKUPec85izl0uoChpRrNs83NmVmbyHnL0z-BgyTBSsURR2LIFakiCChv3MJyRqDWOpXB6VZxoGSNW6fYjjPNZdcWr39CNU6RYbh2SUZSmk4nva3sDynokUpHY4if9r_S9Fzd41BcBve-yMTMERLTZFHjia2jyZ-DSpkyiVP91N65C0k6_98lp9lkmdMC2mRA7ifJtH4yb-7MzxiHk3k7CUi7SdJ2kzSIh3LPmGWDTl2s7y6mFna7cnZrcjZHcs5gVxDjh2564sh57Qn57Qi53Qs9wRyDTl25PoXQ85tT85tRc7tWL0TyDXk2JG7uRhyDf-KmKuFKBTfy3vszd3yWuZpxqtrXImlnPEHKWYbm6qMNrrNQsqVrrqkKsKiapUB_xWTWrG9JyaHYrveucHaqVW79WL3nNy9WvFVvfPVOc7XteJ-vXP_HOeb-ll1G45J_SE79E7Wb_4EAAD__0AWPO8=
# Test that orderings on GROUP BY columns are propagated through aggregations.
statement ok
@@ -295,7 +295,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJzMllFv4jgUhd_3V1j3CVSjYC
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT sum(x) FROM (SELECT a, b::float + c AS x FROM data) WHERE a > x GROUP BY a ORDER BY a]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMll9v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ZMdMzS2bXtSbimn7LsBaCZ_bMUabracx0PY2ajuCY6XocM53rN-y-6aO3f34FAAD__2DXviQ=
# Ensure that an interesting input ordering that causes an ordered group by
# forces an ordered synchronizer. We create an index on b even though it's
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin
index 0fdf32ba0089..e2e71602a187 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin
+++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_indexjoin
@@ -25,18 +25,18 @@ NULL /10 {1} 1
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT * FROM t WHERE v > 10 AND v < 50]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkEFr4zAQhe_7K4Z3ShYtK-9SKDolNA41pE5qG1pIfVDtIRgcy5Xk0hL830vspKGHQo_zvqfRxxzgXmoopOEqvMmoszUtk_UdbcPHzWoexTRZRGmW3q-mdKr8HgueHm7DJKTJKz11Uv5nCuSU5vHiMynoSk5zCDSm5Fjv2UFtESAXaK0p2Dljj9FhKETlG5QUqJq288c4FyiMZagDfOVrhkKmn2tOWJds_0oIlOx1VQ9r_ay11V7bdwikrW6coj8QWFa1Z6toMvt30VRKRXF2fbI9k6PumSDvBUznLyrO6x1DBb34uW7CrjWN4y-m322WfS7A5Y7HkzjT2YI31hTDN-O4Ht4NQcnOjzQYh6gZUZ_3vz4CAAD__x1Pj38=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUE9L-0AQvf8-xTCn9sdKNxVB9tRiUwzUtCYBhZrDmgwlkGbj7kaUku8uybbWChU9znvz_vB2aF5KFBj7C_8mgUaXMI-Wd7D2H1eLaRDCYBbESXy_GML-5b97sPBw60c-DF7hqeH8ksDjQ5iGs08kgys-TJFhpXIK5ZYMijV6mDKstcrIGKU7aNc_BPkbCs6wqOrGdnDKMFOaUOzQFrYkFJjI55IikjnpEUeGOVlZlL2tndS62Er9jgzjWlZGwAWmLUPV2KOhsXJDKLyW_T50XpSWNOmRd5rocAGDyfi4gBAiCJPr_RAHplviwJwtNf5LqYhMrSpDJ5XOOfM2ZUj5htzaRjU6o5VWWR_jzmWv64GcjHWs546gclRX8KvY-1E8_iZO238fAQAA___oe8It
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT * FROM t WHERE v > 10 AND v < 50 ORDER BY v]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkM9L40AUx-_7Vzzeqd2dpZMsCzKnVptioKY1CajUHMbkUQJpJs5MilLyv0uS1lqhosf3_TUfZofmuUCBkTf3rmKodQGzcHEDK-9-OZ_4AQymfhRHt_Mh7CO_-4CFu2sv9GCwhcea838EDh_CJJi-Kyn850NYhFMvhMsH2CbIsFQZBXJDBsUKHUwYVlqlZIzSrbTrAn72goIzzMuqtq2cMEyVJhQ7tLktCAXG8qmgkGRGesSRYUZW5kU3a8eVzjdSvyLDqJKlEfAXGc7ywpIWMBi7R2IhhB_EF3vwg9OSHxxMGoaqtkcUY-WaUDgN-z5upLQlPXJOScfun7Pz7k_mQzKVKg2dzJ9b5k3CkLI19T9uVK1TWmqVds_056LrdUJGxvau0x9-2Vst4Mey82XZ_VROml9vAQAA__9lcsVp
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkVFr6kAQhd_vrxjmSe_di0mkUPZJWyMN2GiTQFtsHtJkkEDMprsbaZH895Ks1lpQ6uOeM-ebw-wW1VuBHEN35t5GUMsCpsH8Hpbu02I29nzoTbwwCh9mfdiN_DUDGh7v3MCF3gZeassaEthWH8b-5EtJ4crqwzyYuAHcPMMmRoalyMhP1qSQL9HGmGElRUpKCdlK227Ay96RWwzzsqp1K8cMUyEJ-RZ1rgtCjlHyWlBASUZyYCHDjHSSFx1WjyqZrxP5gQzDKikVh_8YNwxFrQ9ApZMVIbcb9vul07zQJEkO7OONRufQGzmHY3DOPT-63t1k77RH2TsnSzmXlAqF1CQHznGlkfPvJH54CT4gVYlS0RH-FNlqYoaUrch8phK1TGkhRdqtMc95l-uEjJQ2rm0eXmmstuD3sH027JwPO2fDwx_huPnzGQAA__9gPfgb
# Here we care about ordering by v, but v is not otherwise used.
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT w FROM t WHERE v > 10 AND v < 50 ORDER BY v]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkd9Lg1AUx9_7Kw7naaMbU0cQ98nVHAlLlwoVywfTwxCc1-69rmL4v4e6tRYs6vF-f5zvB-4W1WuBHENn7txEUMsCZoF_B0vncTGfuB4Mpm4YhffzIewib31Aw8OtEzgw2MBzbRhjAtMYwsSbfikpXBpD8IOpE8D1E2xiZFiKjLxkTQr5Ek2MGVZSpKSUkK207QJu9o7cYJiXVa1bOWaYCknIt6hzXRByjJKXggJKMpIjAxlmpJO86M5qu5L5OpEfyDCsklJxuECGs7zQJDkMbOtAzDl3vehqB753WvK9gwz9WnOwLWaPMW4YilofuJROVoTcbNjf2UMhNcmReYxtm-eHrZND1n-GAlKVKBUdDZ26bDQxQ8pW1H-EErVMaSFF2s30T7_rdUJGSveu2T_csrdawO9l89ey9aMcN2efAQAA__-TC8s8
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUV2Lm0AUfe-vuNynhE6JoxTKPJk2hgqppiq0JfXB6iUIxrEzY3aX4H9f1GSzWUjYPM4593xw5oD6f4UCY2_lfUugVRUso_AHbLzf69XcD2Cy8OMk_rmawvHkYTww8Ou7F3kw2cPf1rIcAm5NYR4sXpAcPltTCKOFF8HXP7BPkWEtCwqyHWkUG-SYMmyUzElrqXroMBz4xSMKi2FZN63p4ZRhLhWhOKApTUUoMMn-VRRRVpCaWciwIJOV1WBr3EaVu0w9IcO4yWot4BMyDFsjwLWZ62DaMZStObtrk20JBe_Y-xssy8qQIjXjl_EjLmDi8vMyQgg_SL4cBzox_UIn5mop-55SsVSG1My-rOTyj-cBrgY59wRFpBtZa7oIuuZsdSlDKrY0_rGWrcpprWQ-xIzPcNANQEHajCwfH349Un3B12J-U2zfFts3xc4bcdp9eA4AAP__RgD97A==
# The single join reader should be on node 5, and doesn't need to output v.
query T
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join
index bb569e37603f..dd0cd48c171a 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join
+++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_merge_join
@@ -456,7 +456,7 @@ SELECT url FROM [EXPLAIN (DISTSQL)
OR pa1 > 0
]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzsl19v4kYUxd_7KUa3L9AdZI_HdsBSJK-6bMsqC1tI1UpbHrx4CpZY2x0bqaso370yhoQ4zlzPTtK88Gbj-5s_95wjXW6g-GcLASzGV-Ofr8lObsn7-ewj-Tz-89PV28mU9N5NFteL36765FDyU12QR1KkJSMfZpMpWcsojVebZBs75PfFZPoL6eVJzPrkj1_H8zHp9Xr7d_LXzra5uCSM9cnb6Tty8uvqkjDe75PZnDSLR23FDuu3VvPWpTk_VufRsZbY_SVQSLNYTKOvooDgMzCg4AAFDhRcoODBkkIus5UoikxWJTd7YBL_C4FNIUnzXVn9vKSwyqSA4AbKpNwKCOA6-rIVcxHFQlo2UIhFGSXb_TaH5oW5TL5G8htQWORRWgRkYDnWj5bnW8xynfp5aDHLIVEaE06yciNkARTeJ9tSyGDf2fC0r0EQTKbXw0MPwtPmHj8dunaKjZ7EnLsVWzj-9HacN7jQuWv78Qssbylku_LQwvvOfflGNlGxedizkMHydkmhKKO1gIDd0u-Twnu47Il1v1cOk2s4T17jfp1MxkKKuLnOm2rjTlUtHfko5Fp8yJJUSIs13LkVf5e9kL3pX8pkvakfgcJsVwYkZDR0aOjS0KOhT8OLxu3vb8Y73GyXtp269cDTbJDlFvMale17uw_2Zt3NwTrm9AlfDCy3evaq391zZtWZ1ZDF18isvjTPl1_2OvllL59fp7tYTtcMnQgysPw71fz6uVLNP2dInSENWS50MqQt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8olbjWooyUch1-JDHEZ5SSru2oq_s55H3_RvZbjeFJeY4Nkuc5FHiceIZxFvSDybeDcXjW612Nkualp144Kn8SBODGZWRjbPPTybm2q4o-UZcMEXA8PKr4f5c-ua8wBY6uk8sF_PA9V5oKM41TgPusre5WygL3M22M9_NrD2arG2-SwJMjDsk2p2cZ2rZl-TT2Cpp3zevOZTlU8NxSnTyWdH2bvkk71MPm-eP5-8vVq8bT6btRkYzjWpBBZ4SqXzmkpVKjV0plwnlVeJ3SWL_GWy6Dx_Fq32Gllts-gMDGoeJRqah5tcI2peE0dgjac4jl7jqIqjhtTU0onjtXp3SaT1Mokcfd8_24blzEWaxFEqWv23mvmGRLAWRZnSeCdX4pOMV_tpitvZnts_CESaFW9pcTOJilf5AsswrcK0DPMzmOrBTheYsk603YVmpppmGjVjerDTBa7UTJe2u9CVmtVorjSppS64pYQZYPGhkrbVsN0lH2oYyIcahvIB0EA-1DSUj5su-VDDQD7UMJQPgAbyoaahfDhd8jFSdwATaAG1BqLVA9Q01ATUNNgFABxqA2oc8jnVaZ41xQEacDpAQ1aHcMDrAA6ZndZ6iY7bqbqXUAuwe62baNldTUN2V9Og3QEcsrsaB-1ea6RadlfTkN3VNGh3AIfsrsZBu9faqZbda43l3O4OYPdaZ9Gyu5qG7K6mQbsDOGR3NQ7avdZVteyupiG7q2nQ7gAO2V2NQ3Zn6h_Sqt2Xjz_8FwAA___OjNsw
query T
EXPLAIN (VERBOSE)
@@ -509,7 +509,7 @@ SELECT url FROM [EXPLAIN (DISTSQL)
OR pa1 > 0
]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzsl0Fv2zYUx-_7FMTbxV5pSCQlxxYQQMWabi5Su7MzbEDng2pxtgBX0igZWBHkuw-y7MRRFD6xhJdLbpLFH8lH_v7A8y0U_2whgMXV9dXPN2SntuT9fPaRfL7689P128mU9N5NFjeL36775DDkp3rAWkVpvNok25iTD7PJlOSRkmnJyO-LyfQX0suTmPXJH79eza9Ir9fbv5O_dq4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6hhyB8ADfhDTUP-cLv4Y9hF4WoYULgahhQO0IDC1TQ4AS4GyFnFKdBU6MUE0RE5QAMqB2hI5hAO6BzAIaHTizmio3R6MUd0pA7QgNYBGhI7hANqB3BQ7uoZSm1A7jpD9PLMdaaoLg3KXWuO6uKg3NWTFJK7zijVpSG5aw1TbRySu9Y4vcTV85QOAbnrTNTLM9cZqbo0KHetoaqLQ3Jn6qlalfvi8Yf_AgAA__9rwtp2
query T
EXPLAIN SELECT * FROM grandchild2 JOIN parent1 USING(pid1) WHERE
@@ -553,7 +553,7 @@ SELECT url FROM [EXPLAIN (DISTSQL)
OR gcid2 >= 49 AND gcid2 <= 51
]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzkl9-O4jYUh-_7FNbpDemYJs6_gUgjZdVlVVazsGVGaqUtF1niQiQ2oU6QuhrNu1chMCSB9YnXOxqkuQuOv9jH_n7S4QHyf9cQwN3odvTbPdmKNXk3m34gn0Z_fbx9M56Q3tvx3f3dH7cG2U_5pZqwWCXr2Cbvp-MJWYoojfcD0wnp9arnXzdJzMhN_fVuyCBvJm_JYdIiie3WpHLIOJnlnM5yDPLn76PZiPSaa_69tSyH3xCv-ZHju8UNuTYMMp0dN7vbxwFk9plNHkjmGgd22aDc4Z5aNuZ7zDDmQCHNYj6JvvAcgk_AgIINFByg4AIFD-YUNiJb8DzPRDnlYQeM4_8gsCgk6WZblMNzCotMcAgeoEiKNYcA7qPPaz7jUcyFaQGFmBdRst4tU-0_3IjkSyS-AoW7TZTmAembtvmz6fkmM127eh6YzLRJlMbEIVmx4iKH-SOFbFvsVz4u-PkrWUX5qrlUyGho09CB-eOcQl5ESw4Be6TfV4fX_Hjt4r-3GArvknXBRVDaEtYkCYJgPLkf7O8urClyeLO_7bAuSIuq6_GEHTi3pkiLc2uaPHE_4ODtbx788WuZiLngcftrVzS0r2joXJXbUJp95k4_cLHk77Mk5cJkLTnX_J-iV_uCcSOS5ao5BBSm2yIghyJp6NLQo6FPw2saDmg4bB3W8QicDkewTc-VdbaSSdbPNibzWjPPr-021mbdvWfd8vsN4_umWz575bj7vFlWqMlXyLJ6Ya851-wycs1eMNd2dw_tjtmqqdY3_Scf_eq59NF_3mwp1HStki3lwl5ztuzLyJb9gtlyunvodMzWeev65uB5E6VQyUAlUR3Lec05ci4jR84L5sjtbp_bMUeDvsmsg3yetf9R2ses542SQjFDlSh1r-g1p8m9jDS5F_JP7sw-ZzzfZGnOO_1Ps8pKebzk1Xnm2VYs-EeRLXbLVD-nO27XbMc8L6q3dvVjnFavyg12h30deKgDM619M09OM4Ujs9VgXwce6sBMa9-tIzuh7TZt1WlHft6OFGbNM7PatKsjuBxGBJfDiOByGBMcoRHBPR3B5TAiuBxGBJfDmOAIjQju6wh-raOoHEYUlcOIonIYUxShEUUHOorKYURROYwoKocxRREaUXSooyjT6hMQGpEUoRFLERrTFMOxXkGvWdDrFvTaBc1-Qa9hYFodAztpGZRsldOYrXIas1VOo7YiOGarSrN0emcq3ZIqjdmq1C8p45itJ82D1Nb540__BwAA__-TjQ6E
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzsl12P4jYXx--fT2Gd54Z0TBM7L4RII2XVZVVWs7BlRmqlLRdZ4kIkltAkSF2N5rtXITDkBXziyY7oxdwltn_xOcf_v4_yCOnfa_DgfnQ3-uWB7JI1-TCbfiJfRn98vns3npDe-_H9w_1vdxo5LPmpWLBYReuQk4_T8YQsk2ATHgamE9LrFc8_b6OQkdvy9H5II-8m78lx0SIKeW1RPqQ1VpnNVaZGfv91NBuRXnXPP3eGYYpbYlc_cppb3JKBppHp7BTsPo4jyPiZII8ks7Qju6xQ1vBALSvrbaZpc6CwiUMxCb6JFLwvwIACBwomULCAgg1zCtskXog0jZN8yeMeGIf_gGdQiDbbXZYPzyks4kSA9whZlK0FePAQfF2LmQhCkegGUAhFFkTr_TZF_P42ib4FyXegcL8NNqlH-jrX_6_bjs50ixfPrs50ToJNSEwSZyuRpDB_ohDvssPOpw2_fierIF1Vt_IZ9Tn1TZg_zSmkWbAU4LEn-rI87OrHSwf_Y5I5hchVQvwQrTORiERntUIXE16uRL8kQM_zxpMH96ALvyS_48xBSX5ZfDWqLL1n7MhZJfnVOKskwWfuBxyqebFip6_FSSgSEda_dkN9fkN98yYPQ2n1mcP4JJKl-BhHm_w8aoJZi7-yXukL2m0SLVfVIaAw3WUeOSZJfYv6NvUd6g-o71J_eFE0VosS7Dbn0jqbySTux1udG7WV5_e2K3uz9p5i7e6GC27q61b-bOfj1uveEwo5OQr3RNfELt0ZSLinO4O93RnNil3xznCueGfw9hrnLX1bknFfd5617hTPudad1_WtQk4DFd92TOySb5FwT77lb75tVuyKvh1c0bdme42bLX17XtF93X1dtypk4qq49UXpXPIoEuTJo-abR5sVu6JH3St61GqvbKulR92-zoyjsG3j8JIrmxmva1OFZIYqNn1pRpecisR5cqr15tRmxa7o1OF_5M_5TJwzkW7jTSpa_RcbeaYiXIqinmm8SxbicxIv9tsUr9M9t_8BCUWaFbNm8TLeFFN5gO1htwvMeCfa6UJzQ06zOm1U6Aps1GGuUHCuBrtd4FrBVWmnC10reIM2pQW35KdlyU-LyY_L7uIPOYz4Qw5j_kBoxB9yGvOHI634QF7wQRd_yGHEH3IY8wdCI_6Q05g_3C7-GHZRuBxGFC6HMYUjNKJwOY12gEYDqVScIZcKa3QQFZEjNKJyhMZkjuGIzhEcEzpr9BEVpbNGH1GROkIjWkdoTOwYjqgdwVG5y3sosxG5qzTR5pmrdFFVGpW7Uh9VxVG5yzspJneVVqpKY3JXaqbKOCZ3pXbaxOX9lA0Ruat01OaZq7RUVRqVu1JTVcUxuXN5V63Lff70v38DAAD__4igEZA=
query T
EXPLAIN
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables
index 1f7b81c154ae..f2eff5127a9c 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables
+++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_numtables
@@ -54,19 +54,19 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyUkFFLwzAUhd_9FZfri7pIm-
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT 5, 2 + y, * FROM NumToStr WHERE y % 1000 = 0 ORDER BY str]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzElG-L2k4Qx5__XsUw8AOvrpiN0fMWCra9HBWsXqPQlsMHqRkOIWbT3Q1UxPde8qfceWiyaMFn2c185zvzmWV2qH_FKHDuT_xPC8hUDA_B7As8-d8fJx_GU2jdj-eL-dfJDVQhfQYutGHL4F0ZmmQbI7VR8O2zH_jQ2sL_wB3HuYH34MAsuPcD-PgDtFFLZJjIiKbhhjSKJ-TI0EWGPWToIcM-LhmmSq5Ia6nykF0hGEe_UTgM10mamfx6yXAlFaHYoVmbmFDgIvwZU0BhRKrrIMOITLiOC5u_FY5Std6EaosM52mYaAGdrus4efTDOjakBLRGvCpfCDGeLoZFF9U3MgwoifK4fnXFYMTb7qsDg5GLyz1DmZmXYrUJnwkF3zP7huZSGVLd_mEvI699Mr17Mv1LVqkiUhQdS3qkhqnsyLTLD3mesu8d2HP7cXHbcRXT6nS9682soatqZoNzZ-baQ3OtoXkFtMH1oDV0VUG7PRdazx5azxraoIA2vB60hq4qaMNzoXn20DxraDmuzpV4NTRU8br7F9v0SPqAdCoTTVaL0slXLUXPVK5mLTO1okclV4VNeZwVuuIiIm3Kv7w8jJPyV17gazGvFbsHYv5W7NY7N1j3atVevdi7pO5-rXhQ7zy4xPm2Vjysdx5e4nxXPyun4ZnUP7K33sv9f38CAAD__5DfJqk=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzElV-LGj0Yxe_fTxEeeMGtkZnMH1cDBdvuLBWsbkehLYsXUycswjiZJhEq4ncvM6PuKpqkWvDOZHKec8zvQNYgf2VAYRwNok8TtBQZeoxHX9Bz9P1p8KE_RI2H_ngy_jq4Q9sjIUYeaqIVRu_qo_lyobhUAn37HMURaqzQ_4i4rnuH3iMXjeKHKEYffyCpxBQw5Dxlw2TBJNBnIIDBAww-YAgAQwhTDIXgMyYlF-WRdSXop7-BuhjmebFU5fYUw4wLBnQNaq4yBhQmyc-MxSxJmXBcwJAylcyzymaXsFeI-SIRK8AwLpJcUtRyPNd1YbrBwJfqdbhUyQsDSjbYPsDjPFNMMOGEh-71PkWNHtneDKW0P5x0qgva_gYMMcvT8ly43cKoR5remwVGPe9sVO9voo65UEw45OieekHz7Hz_7PzXsVykTLD01NATIYa8xQuHHN7WOfvgwJ7YV4HYVqFqQssJ7PtgSLHvQ_v2fTBE3fWBXNoHzx6IZw0kqIC07YEYUuyB3N8eiCHqDoh3KRDfHohvDaRdAenYAzGk2APp3B6IIeoOiH8pkMAeSGANpETRsmRhCLBn0b09C0PUHYvgX7xeJ-bHTBY8l8zqYXLLp42lL6x-CiVfihl7EnxW2dTLUaWrNlImVf2V1It-Xn8qA74VE63Y04s9rdg_EJNjsa-P3dZbB1p1qBeHWrHBuX3Nn77Xijt6545W3NWLu9fEJoaOmUqmbxkx1Ixc1TNiKFpgMNc3jRiqRvRdO84-3fz3JwAA__97VSbX
# Query with a restricted span + filter.
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT str FROM NumToStr WHERE y < 10 AND str LIKE '%e%' ORDER BY y]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyMkE1L60AUhvf3VxzOpbSFuTS5rpxVq001GJM6CajULMbkUAJpJs4HWEr-uyRR1IXg8v2Ydx7OCc1LjRzTIAouM3C6ho1IbmEXPGyjVRjDbB2mWXoXzeG9YqweK407WNWr--tABDA7wpPzvLMCfG8Oq3gNsz6MwpsAphOaTOeQiHUg4OIRjjkybFRJsTyQQb5DH3OGrVYFGaN0b52GQli-IvcYVk3rbG_nDAulCfkJbWVrQo6ZfK5JkCxJLzxkWJKVVT3MfjAuW10dpD4iw7SVjeHwb3G--IsMN1VtSXNY_v-CyjlPMxHGV8gwcbZPMe8YKmc_MYyVe0Lud-z3qIJMqxpD3yh_Wva6nCGVexrPYZTTBW21KoZvRpkM7wajJGPH1B9F2IxRl3d_3gIAAP__QRyYHg==
+https://cockroachdb.github.io/distsqlplan/decode.html#eJyUUE9ro0AUv--neLwlJIFZ1Oxp55RsY1qp1VSFtqQerD6CYBw7M0JD8LsXnZYmhZT2-H7_eQdUzxVyjF3fvUiglRWsovAGNu792l94AUyWXpzEt_4U3iRKSyOp250W_XV35UYuTPbw2Nr23xwcewqLYAmTnvS9axfGIxqNpxBGSzeC_w-wT5FhLQoKsh0p5Bt0MGXYSJGTUkL20GEQeMULcpthWTet7uGUYS4kIT-gLnVFyDHJniqKKCtIWjYyLEhnZTXEvm-cN7LcZXKPDOMmqxWHP9Y_6zemHUPR6o9spbMtIXc69v3-VVlpkiQt57Tc4Bzms6MvcM7jJPKCS2QYtrpnz66Y_WRFRKoRtaKTDeeS7S5lSMWWzKeVaGVOaynyocac4eAbgIKUNqxjDq82VD_w2Ox8aZ59Mqfdr9cAAAD__5I2ysw=
# Query which requires a full table scan.
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT str FROM NumToStr WHERE y % 1000 = 0 AND str LIKE '%i%' ORDER BY y]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlFGLm04Uxd__n2K4EFb5T8hoTFgGCm4bt5WmZqtCWxYfbLwsgnHszAgNId-9OG67a9kUSx7SN-_cc7znd2HmAOpbBRySYB28SUkrK3Ibbz6Q--Dz3fomjIi1CpM0-bi2yaNEadlL6nanRVd9ehfEAbGsPZkQhzFmk1eE2eQmWhGr66_D9wG5mpSTK5ts4lUQk9dfyD4DCrUoMMp3qIDfgwMUXKAwBwoeUFhARqGRYotKCdlJDsYQFt-BMwpl3bS6O84obIVE4AfQpa4QOKT51wpjzAuUMwYUCtR5WZkxP2P7jSx3udwDhaTJa8XJdOYy1qlvy0qj5MSyfOeRiXMeRum1Qfv1bQh99xkg5zxJ4zB6awOFTas58V3qO5AdKYhWPwVWOn9A4M6RnoB6YhGyQInFkMJ3_4fs-AJ5JKaimS2G6j7J6RjuIIYzfrfO2N2a1U5n3mUX7I4nc0eTeYZseVmy-Xiy-WiypSG7viyZN57MG03WMU3_kZv-AlSMqhG1wgHPqT-z7hnA4gH7Z0OJVm7xToqtGdOXG-MzBwUq3Xedvghr0zIBn5udP5qXAzP73eyeM3l-jtk7x7z4K3N2_O9HAAAA__-dmS97
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlV2L2kwYhs_fXzE8IBt5R5yJ0XUHCtnWbBtq4zYKbVlykJphCcRMOjOBivjfS5Ktu0pNBjzxbOfjzn3t9YS4A_UrAwZLb-59WKFSZughXHxBT973x_m9HyBr5i9Xy6_zPnq5orRsruTlRotq9e2TF3rIsraohyghpI_eIdJH98EMWdX53P_soZte2rvpo0U480L0_gfaRoAhFwkP4g1XwJ6AAgYbMIwAgwMYxhBhKKRYc6WErK7s6oCf_AZGMKR5UepqO8KwFpID24FOdcaBwSr-mfGQxwmXQwIYEq7jNKtr_mK7hUw3sdwChmUR54qhwdAmhEC0xyBK_fpwpeNnDozusTnAQ5ppLrkcjo_bm32GLMulL7oYY36wmtbWDn_X8lz7jTvG2HIV-sHHPmBYlJoh18YuPYtrn8V9pRQy4ZInx4iu_T9E-3_8T4EYiGJIT3w2KOc5Rkcc1Hxu1HRu9dgGQ8d8eB0Uh-FNrmN4trk021iaU0ubmEvroDhIu70OaSNzaSNjaZNa2tRcWgfFQdr0OqQ55tIcY2mVroGhrw6Ag6-76_DV8SsQclWIXPEj2HNPJtU3lyfPvPlGK1HKNX-UYl3XNMtFnas3Eq50c0qbhZ83RxXg2zBtDdtHYXoattubO6pHrWmnPexcwj1uDU_amyeXNN-2hqftzdNLmu_aZ0U6XpP2l-y0O9r_9ycAAP__c_gt-g==
#
# -- Join tests --
@@ -124,7 +124,7 @@ vectorized: true
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT x, str FROM NumToSquare JOIN NumToStr ON x = y WHERE x % 2 = 0]
----
-https://cockroachdb.github.io/distsqlplan/decode.html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ouh4PR-8LnKHxCK3RJXpBP78PJgPUWqP_kXmGLpExBwxxEtCR_0RT8O6BAAYTMFiAwQYMXZhjWLFkQdM0YfmW10IwDNbgGRjCeJXxfHmOYZEwCt4r8JBHFDyY-Q8RnVA_oKxjAIaAcj-MijIbXvsrFj757AUwTFd-nHqoDRjGGfdQn8D8DUOS8apIyv0lBY-8YXUjV2HEKaOsQ7ZdlOseavVJnojnecPRzC2Cef9dq18d-fCCHv30cfu8wm_l0WzicTMsc19YnO1JqmMahnEwJOufQup9akj2QY_VOVmcsIAyGmydNM-Vf7fs2wB9cl7Wqt_1lrIlvU7COO-JWtoR_c1bfXJ-dsnC5WP5s2pI3LcOxt3VuMoek6Oknaw6pFe_9N7azlZtot5rlmqvFa3W7tjqDSdx8dFw7gkbjpyg4azjNJypDt1Whm4X0B116BIXH9AvTgjdPAF0-zjQLXXoXWXoTgHdVYcucVH9_zVOSN06AfXucajb6tQdZeo577YicImBCvjnfnHZB01-FnDn-B8TeyxMaLpK4pQqfSoY-SVosKRlLmmSsQW9Y8miKFM-jgtdsRDQlJdvSfkwjMtXucFNMamLyabY3hKTZmJXR0yIllrLOOmJ1aYwcEscuNUgcLOZ2NUR1wJvqtYyXgt8R20LA--KaXXFfx6uGJcjVPfE4p4Oa7FYwloslrGWqLWMy1i7OqwvxKwNySzcmaRNeEnUEmAStYyYTK7nXcaM7MzTJtCIeJ4SyUAlWhNVopZR05upMrmedyk1rbFKJHPVkVDbGayNqInVMmpitZSaRK7nXUptZ7wKqc3f_vsTAAD__wHPXPM=
#
# -- Aggregation tests --
@@ -146,7 +146,7 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyslNGKm0AUhu_7FHKukjIhao
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT count(*) FROM NumToStr WHERE str LIKE '%five%']
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy0lF9r2zAUxd_3KcSF0mQoxHacNNVTSuduZqnT2S4dFFO8-C4YHCuT5LER8t2H7Y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OD2-sH1wt6E7qext2ho-0LQtoWo-3Dat9_TCg3PuhWjw7dCg7KpgXZuhdneg9nag117GL3Hg4Zn7eHs8B40KJsezM4erPYerNYeRrWH8Xs8aHjWHsaH96BB2fRgdfZgt_dgt_ZQGTh9swINylrB-eEVaFA2Fdj_9KJ6ZZiPxZLnBe5cWK9_eVBdZJgssLn1Cl6KOd4IPq_HNI-zOlcvJFjI5i1tHty8eVUBboapMmyqw6YybG2F6W7YUmOP1KNtZXqoDg-VYc3kUZc_faYMj9WTx8rwuTp83gWbajqmK5m6ZVRTM9qpZ1RTNFszXN00qqkaVXdtlz1a_fcnAAD__1YKMbs=
#
# -- Limit tests --
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union
index 9253079d88b9..656b88fd4ad6 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/distsql_union
+++ b/pkg/sql/opt/exec/execbuilder/testdata/distsql_union
@@ -45,13 +45,13 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJyslt-L2k4Uxd-_f0W4T9_SkT
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT x FROM xyz WHERE x < 3 UNION SELECT x FROM xyz WHERE x >= 3 ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJyslt9umzAUh-_3FNa52jRHxDbkD9KkbmuqReqSLsm0TR0XDKwKiUJmjERb5d0nYBJL1toG5xLw75zPx58SP0HxOwUftovrxccdKkWKrjbrz-h28f3m-v1yhV5fLre77ZfrN-jvkqpdUD08om-fFpsFqtDPcjxmEWLo62q5XukW8neIofXmcrFBH36gKgAMWR7zVXjPC_BvgQAGChgYYHABgwcBhr3II14UuaiXPDWBZVyBP8aQZPtS1q8DDFEuOPhPIBOZcvBhF_5K-YaHMRfOGDDEXIZJ2rSpHh4v9iK5D8UDYNjuw6zw0cipO18lqeTCRxekI_Z9f7nazQDDupT1JwgOGPJSds0LGd5x8MkBDwP0BgNGffhoH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ZX8a4okvWxNfaoFcTX2XfQGXTv6B1uMO44csUcexfv2l8HdJjk_FVrfjI5HfGlzGu6FI18bU26NfEN7BvYGDTv07LGV6mhGP3Bk3D65AdmwuvaoVHJr0zuoxxRVZQE11rg0EDV_sXDKY626RJps-u-C-v3N5f_XV0p8v_E7K0MCt9Y9LVwab8OTnoDg8ineXlWyx_jJLy1b7A52IkxR1aLEmxosWKFAe0OCDF3RMxnos7bxF3SXGPLrtHb5ik1X1SPaDFA5oSplnIQMZRRmOGTHCkQWM6hjRpnJpGDZkRQRo2ZLqGNG7I8IY0cNhn5DRx3M7RyDFqSRMnGeIkTZzkTjaaOMmMi6SRk8zpJt90vMk3nW-SJk4yxEnmiOPaRhMnmXGRNHKqzfxJopljdk7RyJ2rF7u_fgUAAP__drSVQQ==
# UNION with partial overlap.
query T
SELECT url FROM [EXPLAIN (DISTSQL) SELECT x FROM xyz WHERE x <= 4 UNION SELECT x FROM xyz WHERE x > 1 ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJysll9vmzwUh-_fT2Gdq3eaI2ID-YM0qduaakhd0pFM29RxwcCqkChkxki0Vb77BExjyVrb4FwC_p3z-PhR4icof2bgwXZ1vXq_QxXP0FWw-YhuV19vrt_6a_T_pb_dbT9dv0K_l9TdgvrhEX35sApWqEbfq-nUjt8gB31e-5u1aiVDBG2Cy1WA3n1DdQgY8iJh6-ieleDdAgEMFDDYgMEBDC6EGPa8iFlZFrxZ8tQG_KQGb4ohzfeVaF6HGOKCM_CeQKQiY-DBLvqRsYBFCePWFDAkTERp1rapHx4v9jy9j_gDYNjuo7z00MRqOl-lmWDcQxfkD7Dnef56twAMm0o0XyA8YCgq0fcuRXTHwCMHPI7PHc3XjF4fkA4BvExLkeaxsMjJ-CQN7HENXO0GzosN-rpVXvCEcZYcVQ0PMgSqv0d3yB63BReMW5Scln_9Yv3ZUX2ibxHRsMiiE8s-r-cDCGcGhCamKxB7Ef85Jk3TtRvMRppO9YdMdYZsTyznv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8FgqrNNmmT67Ir_8srt8uqvoztd_Z-QpYVZ6RuTrvY21c_JXrd_EOksr95i9WOUVK_KAp-LkRR3aLEkxYoWK1Ic0OKAFHdPxHgu7rxF3CXFPbrsHr1hklb3SfWAFg9oSphmIQMZRxmNGTLBkQaN6RjSpHFqGjVkRgRp2JDpGtK4IcMb0sBhn5HTxHE7RyPHqCVNnGSIkzRxkjvZaOIkMy6SRk4yp5t80_Em33S-SZo4yRAnmSOOaxtNnGTGRdLIqTbzJ4lmjtk5RSN3rl7s_voVAAD__20OlTs=
# UNION ALL with swapped column orders.
query T
@@ -110,23 +110,23 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmNFu4kYUhu_7FNa5SiQjmB
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) INTERSECT ALL (SELECT x FROM xyz WHERE x >= 2) ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzElt1u4joQgO_PU1hz1eoYJXYSfiJVas8pVZFY6ALS7qrLRUq8BYmSrBMkaNV3XyUUsSHUE5OS3jWNP0_G8w3jF4h-z8GFYbvb_n9ElnJObgb9L-S-_f2ue9XpkbPrznA0_No9J2dva1abFav1M_l22x60yYr8XJqmNSH8nHR6o_ZgmCy76nZRRFwkTH9w3R6Q_36Q1RgoLAJf9LwnEYF7DwwocKBgAQUbKDgwphDKYCKiKJDJkpcU6PgrcE0Ks0W4jJN_jylMAinAfYF4Fs8FuDDyHuZiIDxfSMMECr6Ivdk8DbNaP1-GcvbkyTVQGIbeInJJzUgi38zmsZAuuWS7T3Zdt9MbNYFCfxknr2D8SiFYxm_BdzEf1mTqRdNstHT9mEIUe48CXPZKj0vCOTqJyUfnwN_NYbfPchFIX0jhZ3YaJyS25MBB3HrRdCjifmiwvWKO1qFwsyIChbn4FZ9dsvMLOXucpn-9m_ouLUunNMNAxkIazNk_qX_f3d8ucGyHTuRt0wMf0QtqQWhwc_-MD4Z3MuFZcfNYAfMMXjOsT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_8FMY3w110l968ijj0Wapg0OByKW5_i-5uhHX78zs9m77rxyZ1ziZDyOTaOPJ2nFSv744fj1HbKcS-TnoiUX0okq09FT1OOOT0zcOpheMbZ1jV3uy4im2-GART_u6_hbicxK6ZESqUEQCZPQq6oty1RclqQ8yf1S_XlR9mX9nyTwbS1U8n-0eWMTTxmq8hXuMhMQlI1KFIhIgo1dxT5brnizJPZD5o3uNou6p_DtL5dlYfmV7LeW5BxbxtLGab-EeIyFxyYhUoYgEyOhV3FPluqdKcg9k_uhes6h7fv6d5efZWLUK2zywhKdt1XoL8xj5iMsFpAoFJEBCr-KdX653fknegcwfvWtd4qfmifEHOl5Gi1jn-hVZTTPT01u9-w7iaGUm-rOJJttpdi_7W277xlTHye5TsXvRWew-Shf4HBbHsHgO-wew5MFCnEU3zqGlOotu2WlpTVzZE1eMxAUPPkqcSzfOoY8S59ItO-1bE6_ZE69Z4bp95rr9uwZ6Nax00w43z3HTDiM3AQ3ctNPITUADN1v2NqyCOsyUKcdOQCM9EQ78BDgSFOHAUJGp1MPgJQje3qlAUpFpl8PJfTB5pl5Yp6CdhscgwNE5aMfhQQhwYJuwd6uog-Az7crSzU5D3QCOdLPjUDeAI93sJ4sAR4vIlCxLN3vJSlCyklOy2csXq2TZONAN4Eg3hKOLp71kJShZmSlZjm6ARrohHOgGcKQbwoFu0n7ASHDASPv9Fegm7SUrQclKTslmtxyrZNk40o1Vsmwc6WYvWQlKVnIu8NlvnXWDZ-NIN9Ydno0j3ewHjAIHjLL_SeRYt_HDLz8CAAD__zsY2Ek=
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) INTERSECT (SELECT x FROM xyz WHERE x >= 2) ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mF9v4jgbxe_fTxH5qtUbBLbDv0gjdXbLaJBYmAWk3dUsFxnwtkgMYZMgwVT97itgqrSYPMfGSe_akl988uDzk9Mnlv67YiGb9Aa9X6feNll5n8aj37y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EviJ9srTTiojwjoowishIoY0RBE6-K1F0jajA9dzm-vGh8DuY3RhQUzv0SV0S0dBP1KyIq3AmGdlWEqMMW0KaKEDVrwRpR8U6IgivsBdGTrZVGVJZnRJZRRFV2P_nNEAVNvCrScI2owfTc5fjyovE5mN8YUVA490teEdHSTTSuiKh0JxjaVRGiDltAmypC1KwFa0TlOyEKrrAXRE-2VhpRVZ4RVUaRsGJMKGjh1ZCma0INZufuhpcXDc_B9MaAgsK5XeqKgJZuonlFQJU7vdCuigB12ALaVBGgZi1YA6reCVBwhb0AerK1i57HninQ1-kyXqS61KPW6nZpevqg9_-ENF4lE_0liSe7MvuXvV1u98ZUp9n-U75_0V7sP9o2-DbMyXBIhwUZlnRYkmFFh9VxmL8N1w7C3CzM6zZpYZWWVmkF0iGZtgrzhk1aWKWlVVqBdI28TEG4bhAWx-EGGW7SN0iTRqFK981pU0KECq0KFyBOu8JrIE7LwgEt_OQmO4wDEzl9uQGaQBrZBOIIJxBHOoE44omf3GomPoE0AgrEkVAgjogCcWQUp53hTRCnpTmKnzjFaWtEFXyJAN9fAFWCtkYAawRtjQDWCNoaAawRtDUCff-ysgakkTUgjqwBcWQNiCNrhJU1II2sAXFkDYgja0AcWSNoawSwRtDWCGCNoK2RwBppZ42krZHAGgl-LwFrJG2NBNZI2hoJrJFW1oA0sgbEkTUgjqwBcWSNtLIGpJE1II6sAXFkDYgjayRtjQTWSNoaCayRtDUKWKPsrFG0NQpYo2hrFLBGgacz6PEMbY0C1igra0AaPt-xswbE4RMeO2uUlTUgjawBcWQNiCNrQBxZo2hrFLBG0dYoYI2irQmBNaGhNaPn__0XAAD__6XUZuQ=
# INTERSECT ALL and INTERSECT with some overlap.
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT y FROM xyz WHERE x < 3) INTERSECT ALL (SELECT y FROM xyz WHERE x >= 1) ORDER BY y]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzEll1v2jwUgO_fX2Gdq6LXKHE--IhUiW6lK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d0R3BM98xUTd-1dbnuRma2SHV31__9CQAA__9kSdPW
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzEmO9v2jgcxt_fX2F9X7W6oGA7_Io0id2NaUgc7ADp7rTjRQa-FokRzglSWdX_fQJWaBLqJw40vFtpPrb3xJ_Hpo8U_b8gn0adXuf3MVvrBfs4HPzBvnT-_tx73-2zmw_d0Xj0Z--W3fx8ZrN_4mHznf31qTPssAf277palVMmb1m3P-4MR9vH3vd6EFHvGL9lg-GHzpD99g_bTMihZThT_eCbisj_QpwcEuSQJIc8cqhGE4dWOpyqKAr19pHHHdCdPZBfdWi-XK3j7ccTh6ahVuQ_UjyPF4p8GgdfF2qogpnSbpUcmqk4mC920zxsvrdXev4t0BtyaLQKlpHPKu525sE69lmbO21BkyeHwnV8nCGKgztFPn9y8q_i43wRK620W0suYf_5dqpjNL7vd_vj5mEV6SUcR_26YfdBdJ8css1p8nRcprBZ5suw-EXTkoXS4iCuKZOXTct7dZnHcdbLUM-UVrPESJMtiR458X_9FET3IxUPVq5IBT7erJSfVIscWqj_4ps2v32n53f3u38dX8Cr6dds0h-FOlbaFbV0Ur--On49R2ynEvk56IlF9MNKuHJlNZ3xyekbiem5xR7PscVdUXFlkUoA6zhs8vp1K8EmrgvnJQvlxUFgb1wKvNxS4CWVAkj_uRTqRUtB5N9mIs8ukxXXK2IlWMdhlzWua6VFXPzCeclCeXEQ2BtbKcq1UpRkJUj_2cpGUStl_m0m8-wyr7K74VpbCdZx2GXN61ppERe_cF6yUF4cBPbGVspyrZQlWQnSf7ayWdRKL_828_LsslqliJNgFYc91rqukxZh8YumJQulxUFcb2ykV66RXklGgvSfjWxd4ivtifGHKlqFy0jl-rZa3WamZndq_w6icK2n6rMOp7tp9j8Odtzug5mK4v1v-f6H7nL_q-0CX8I8DfOXsJeAhR3M-Vl04xxayLPolpkWxsSlOXFpkTi3g1OJ29KNc-hU4rZ0y0x7xsRr5sRrRrhunrluftdAr4aRbprh5jlummHkJqCBm2YauQlo4GbL3IZVUIeZMrWxE9BIT4QDPwGOBEU4MJRnKjUZvADBmzsVSMoz7ZKc3AOTZ-rF6hQ00_AYBDg6B804PAgBDmzj5m7ldRB8pl2tdDPTUDeAI93MONQN4Eg388nCwdHCMyVrpZu5ZAUoWWFTstnLl1XJWuNAN4Aj3RCOLp7mkhWgZEWmZG10AzTSDeFAN4Aj3RAOdBPmA0aAA0aY769AN2EuWQFKVtiUbHbLWZWsNY50sypZaxzpZi5ZAUpW2Fzgs2_d6gZvjSPdrO7w1jjSzXzASHDASPOfRNK6TZ5--REAAP__Cbn3AA==
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT y FROM xyz WHERE x < 3) INTERSECT (SELECT y FROM xyz WHERE x >= 1) ORDER BY y]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mF1v4kYYhe_7K0ZztVGNYGbMl6WV2DasFonCFpDaassFC9MEicXUNlLYKP-9AjZ1YuP3zDB27vLhx3P8MufRmEce_7vhAZ_2h_1fZ2wfbdjHyfg39qX_5-fhh8GIvbsdTGfT34c37N2Paw7nKx4O39kfn_qTPntgf-8bDbVk6oYNRrP-ZHq8DF2u3zNxw8aT2_6E_fIXO8y5x7fhSo8W33TMgy9ccI9L7nHFPe5zjzf53OO7KFzqOA6j4yWPJ2CweuBBw-Pr7W6fHP889_gyjDQPHnmyTjaaB3y2-LrRE71Y6aje4B5f6WSx3pyWeTh87-2i9bdFdOAen-4W2zhgtfpx5Y_rTaKjgPVEGjkIgsFo1uEeH--TgPUknz95PNwn6eJxsrjTPBBP3nUBm1cHXDJlnk_a5Ltdx8l6u0zqIjO-nsgskDJfD-x-Ed9fuD4Noa4L0Sw1hF8YIr3PfhtGKx3p1as7ne5SGFOiWaURmlVFQJNKI7QcInhXpfy0iO-nOhnv6iozqdlhp4MXMvkwHHKPb_Q_ybueuHkfre_uTz_9v82LH6tts8OmYZToqK5yU_u58P4dg7FdmsiPm14IMQpr4a7uN7Izvrh899XywtwywsAydVmrq5JFaB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O0GaAJpZBOII5xAHOkE4ognfvFRy-MTSCOgQBwJBeKIKBBHRnHaGd4GcVqas_iFU5y2RtTBlwjw_QVQJWhrBLBG0NYIYI2grRHAGkFbI9D3LyNrQBpZA-LIGhBH1oA4skYYWQPSyBoQR9aAOLIGxJE1grZGAGsEbY0A1gjaGgmskWbWSNoaCayR4P9LwBpJWyOBNZK2RgJrpJE1II2sAXFkDYgja0AcWSONrAFpZA2II2tAHFkD4sgaSVsjgTWStkYCayRtjQLWKDNrFG2NAtYo2hoFrFHg6Qx6PENbo4A1ysgakIbPd8ysAXH4hMfMGmVkDUgja0AcWQPiyBoQR9Yo2hoFrFG0NQpYo2hrXGCNm9Oa6fMvPwMAAP__tpGFmw==
# INTERSECT ALL and INTERSECT with swapped column orders.
query T
@@ -211,23 +211,23 @@ https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mNFu4kYUhu_7FNa5SiQjmB
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) EXCEPT ALL (SELECT x FROM xyz WHERE x >= 2) ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8lm9P4kwQwN8_n2IzrzTPkna3LX-amOijNZLwgAck58XjRaV7QoK0ty0JaPzulxY5heJOl0rfid1fh5n5DbMvEP-egQsDr-NdDslCzsh1v_c_uffubjsX7S45uWoPhoNvnVNy8nZmuT6xXD2T7zde3yNL8nNhmtaY8FPi3V16t0Ny0emg58VZCvT6V16f_PeDLEdAYR4Gous_iRjce2BAgQMFCyjYQMGBEYVIhmMRx6FMj7xkQDtYgmtSmM6jRZL-e0RhHEoB7gsk02QmwIWh_zATfeEHQhomUAhE4k9nWZjl6vk8ktMnX66AwiDy57FLakYa-Xo6S4R0yTn7m6Lruu3usAkUeoskfQKjVwrhInmL_R7yYUUmfjzZDpadH1GIE_9RgMte6WE5OAfnkJb9a5Pgnybx_p7FPJSBkCLYetMoJbEjeypx48eTgUh6kcF2mjlcRcL9YCFQmIlfyck5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_jSWqssX5le__1-9k-mxzDMGxd9-s7-z4t9W0p7qLkbnudVZ1PtSlObc_jkafLRx-UjwQBZY1zioSCF6t7Wmc-je3IWDPaWmmQkeiRPf_Fz1Fy1zNpZ-arnZD7y5kJn9lDHk3Mf-nFlbx8Z8e3d6t_FUi8wkm8F9vUWF9VdmP6_cX1qwUy2xfHr0X3FHEdl-KZr8u7Ae_dvra1vWQ0dYGe9lXJ12zrQRGbrq6-gfWcgE6ZkD4oIQkieh3v5Xm9l-fwHiT-6H31UO9V8b5SRdpKl_yALR4oYtNWtTcQjxGQPGVC-qCEJIjodcRT5xVPnUM8kPijeLVDxdPF-0oXaaugtLqN8sQDRWzaqv4G4jECkqdMSB-UkAQRvY54-rzi6XOIBxJ_FK9-qHhB8b4KirRVpcTWDpSwaarGG2jHiEeeLh99UD4SBPQ60gXnlS44h3Qg8UfpGqf4ebln_a5JZvE0MYV-OZazwMzo1qy_gCSe26G5sfFwtc36ZWfFrd4YmSRdfyrXL1rT9UdZgc9huQvL53CwBUseLOVRdO0YWumj6IabVs7EtTtxzUhc8eCdxLl07Rh6J3Eu3XDTgTPxijvxihOuur_rqvu7BnrVnHTdDdePcdMNIzcBDdx008hNQAM3G-5pWAbjMDdMOXYCGumJcOAnwJGgCAeGytxI3Q5egeDdMxVIKnPTZXvzAGyeGy-sU9BNw2MQ4OgcdOPwIAQ4sE26Z6usguBz05Wlm5uGugEc6ebGoW4AR7q5TxYJjhaZG7Is3dxDVoEhqzhDNn_5Yg1ZNg50AzjSDeHo4ukesgoMWZUbshzdAI10QzjQDeBIN4QD3ZT7gFHggFHu-yvQTbmHrAJDVnGGbH5z1pBl40g31pBl40g395BVYMgqzgU-33KsGzwbR7qx7vBsHOnmPmA0OGC0-08iu7oNHn77GQAA___NrNLZ
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT x FROM xyz WHERE x < 2) EXCEPT (SELECT x FROM xyz WHERE x >= 2) ORDER BY x]
----
-https://cockroachdb.github.io/distsqlplan/dec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Yp2H-EvYOYG4Hc34S3TiFFvIkumWmhTFxaU5cWiQu7OBU4rZ04xQ6lbgt3TLTnjHxmjnxmhGum7_ruvm7Bno1jHTTDDdPcdMMIzcBDdw008hNQAM3W-Y2rII6zJSpjZ2ARnoiHPgJcCQowoGhPFOph8ELELy5U4GkPNMuh5N7YPJMvVidgmYaHoMAR-egGYcHIcCBbdzcrbwOgs-0q5VuZhrqBnCkmxmHugEc6WY-WTg4WnimZK10M5esACUrbEo2e_myKllrHOgGcKQbwtHF01yyApSsyJSsjW6ARrohHOgGcKQbwoFuwnzACHDACPP9FegmzCUrQMkKm5LNTm5VstY40s2qZK1xpJu5ZAUoWWFzgc9uOasbvDWOdLO6w1vjSDfzASPBASPNfxJJ6zZ--u1nAAAA__-_EfGQ
query T
SELECT url FROM [EXPLAIN (DISTSQL) (SELECT y FROM xyz WHERE x >= 1) EXCEPT (SELECT y FROM xyz WHERE x < 3) ORDER BY y]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJy8mF1v4kYYhe_7K0ZzlahGMDPmy9JK2W5YLRINKSB1qy0XLEwTJBZT20hho_z3CljqjY3fM8PYucuHH8_xy5xHY555_O-KB3zcG_Q-TNg2WrGPo-Hv7Evv8_3gff-OXd32x5PxH4NrdvXjmt3xiqfdd_bnp96ox57Y39tGQ-l3TFyz3ucPvfsJvHjO1DUbjm57I_bbX2w35R5fhwt9N_umYx584YJ7XHKPK-5xn3u8yace30ThXMdxGO0veT4A_cUTDxoeX64322T_56nH52GkefDMk2Wy0jzgk9nXlR7p2UJH9Qb3-EIns-XqsMzT7vvNJlp-m0U77vHxZraOA1ar71f-uFwlOgrYjUgfLwiC_t2kwz0-3CYBu5F8-uLxcJuki8fJ7EHzQLx4lwVsXhxwzpR5PmmT73YZJ8v1PKmLzPhuRGaBlPm6Y4-z-PHM9WkIdVmIZqkh_MIQ6X226zBa6EgvXt3pcJfCmBLNKo3QrCoCmlQaoeUQwbso5adZ_DjWyXBTV5lJTXYbHZxE8n4w4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o7QCaZdMG4V5yyQtjNLSKK1AukHepiDczBEW5-EWGW7TH5A2jUKd7s1pU1yECq0KFyBOu8KBDZyWhQPU-MWH7DTeAHH6dgM0gTSyCcQRTiCOdAJxxBO_-Kjl8QmkEVAgjoQCcUQUiCOjOO0Mb4M4Lc1Z_MIpTlsj6uBLBPj-AqgStDUCWCNoawSwRtDWCPQFirZGAGuEkTUgjawBcWQNiCNrQBxZI4ysAWlkDYgja0AcWQPiyBpBWyOANYK2RgBrBG2NBNZIM2skbY0E1kjw_yVgjaStkcAaSVsjgTXSyBqQRtaAOLIGxJE1II6skUbWgDSyBsSRNSCOrAFxZI2krZHAGklbI4E1krZGAWuUmTUKPJkB1ijaGoWer9DWKGCNoq1RwBplZA1Iw-c7ZtaAOHzCY2aNMrIGpJE1II6sAXFkDYgjaxRtjQLWKNoaBaxRtDUusMbNac3k9X__BQAA__9Q0IAr
# EXCEPT ALL and EXCEPT with swapped column orders.
query T
diff --git a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join
index 2cbf98738079..c90d025f459c 100644
--- a/pkg/sql/opt/exec/execbuilder/testdata/lookup_join
+++ b/pkg/sql/opt/exec/execbuilder/testdata/lookup_join
@@ -218,7 +218,7 @@ SELECT *
FROM (SELECT * FROM data WHERE c = 1) AS l
NATURAL JOIN (SELECT * FROM data WHERE c > 0) AS r]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMldFvmzAQxt_3V5zuqZ2MwEDa1NIkoi3VUmWkSzJtUscDC6eOjWJmjLQpyv8-Ad2aRK1BSh7yePg-vs-_s-w1lr8yFLgYT8dvl1CpDK7nsw9wN_5yOx1NQjh7N1ksFx-n5_DY8rptONstk1jH8Pn9eD6GFbwBfg6jBWQQjpaf5qMp3MzqXxkkXyvH8QicRqciZJjLhML4gUoUd8iRoYsMPWToI8MBRgwLJVdUllLVLetGMEl-o3AYpnlR6fpzxHAlFaFYo051RihwGX_LaE5xQsp2k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7A3N7AXMN09sDmCbHGtjV8YBpLDeBqVf_Z-_nltQzXuQiK3iv19Gq31ce3_P2MS5EJZf8VoplY9Mep42uuYh5Uba_0vYwztqf6oCbYqoU22qxrRQ7HTF9KXbUsS_U1q5S7anFnlKscb44ZOlLpXigdh4oxVdq8dUhsammY7qSqVtGNTWjB_WMaormaszVTaOaqlF1115mD1f__Q4AAP__Rs1urw==
statement ok
CREATE TABLE books (title STRING, edition INT, shelf INT, PRIMARY KEY (title, edition))
@@ -1048,7 +1048,7 @@ SELECT url FROM [ EXPLAIN (DISTSQL)
SELECT a,b from small WHERE a+b<20 AND EXISTS (SELECT a FROM data WHERE small.a=data.a AND small.b+data.c>15) ORDER BY a
]
----
-https://cockroachdb.github.io/distsqlplan/decode.html#eJzMlVFro04Uxd__n-JynwyZVEdNmw78we7WspbUdJPAdunmYaJD113ruKPClpLvvqgpNWWrLoGQR69zPOf-jjDPmP2KkeHCnbofl1CoGK7msxu4d-9upxeeD9qlt1guPk8HsD3CCazrM9kjj2P48smdu6BpHIawHsC3wjCsAExjABf-Jbh3pRy0F3GtDHnOX4TVV044_F9NT3it07bzNQzrebD9tAA6HgxgNr905_DhK_AVEkxkKHz-KDJk90iRoIkELSRoI8ExrgimSgYiy6QqjzxXAi_8jcwgGCVpkZfjFcFAKoHsGfMojwUyXPJ1LOaCh0LpBhIMRc6juLKp8jmpih65ekKCi5QnGYORToEnIVCQ-XehkOBVFOdCMdAcCkNwzAYjxpjnLydIcFbkDBxKHBNXG4KyyF9DZTl_EMjohvQPfi2jZJt7vJt7-ZQKBlP3agkL98aD65nnlyd4zhvbTKX8WaTwQ0YJyKSMVob0QXPMcolxo41_WsJ8d4nX7FKFQolwN7ZDh7ja_GVTX45kqtPddt6zt3bsaf_yaa_ydTrSzYPU3xG9Uf_p8dZv9udv9uNvjnTrIPw7ojf4nx0vf6s_f6sff2uk2wfh3xG9wX9yvPzt_vztfvztkT4-CP-O6A3-58fLv-MOnYsslUkmet0sRnk3ifBB1HdZJgsViFslg8qmfpxVumoQiiyv39L6wUvqV2XAppi2is0dMX0rNtudO6ytVrXdLrb3yT1uFZ-2O5_u43zWKp60O0_2cT5v78ro-E3af7K33qvNf38CAAD__4jwslA=
+https://cockroachdb.github.io/distsqlplan/decode.html#eJzMllFvmz4Uxd__n-LqPiWKU2IgbYr0l9KtVKNKSZdEWqcuD06wOjaKmQFpVZXvPgFpSqrVZkKR8piLD-dwf0eKnzH9FaGDc3fiflxALiO4mk1v4N69u51ceD50Lr35Yv550oXtEUZgVZ1JH1kUwZdP7syFTodBD1Zd-JYPBtYazEEXLvxLcO8KOXRexJUyYBl7EZZvOWHwfzk9YZWus52voFfN19tXc6DDbhems0t3Bh--AlsiwVgE3GePPEXnHikSNJGghQRtJDjEJcFEijVPUyGLI8-lwAt-ozMgGMZJnhXjJcG1kBydZ8zCLOLo4IKtIj7jLODSGCDBgGcsjEqbMt84keEjk09IcJ6wOHWgb1BgcQAURPadSyQ4zTMHxpSMTVxuCIo8e_VLM_bA0aEb0jzTVRhlXHJpDPcDVXMHOmMKPRibNRaO43j-YvSuv_kv_tcijLcroW92snhKuAMT92oBc_fGg-up5xcnWMZqm5oI8TNP4IcIYxBxsZtiSz50xmYRfFgj_RK80Ratd7_iNbyQAZc82I89pj1cbv7yqb7oi8Sg-4t-z97es6fNi0UbFcugfcNsWy1Nql21Tg9ULY1_vVr0eKtlNmdrNmNr9g2rLVtNqh3bswOx1fjX2ZrHy9ZqztZqxtbqG3ZbtppUO7ajA7HV-NfZWsfL1m7O1m7G1u4bw7ZsNal2bM8PxFbjX2drHy9bzaVlxtNExClv9E8-KO4CPHjg1d0hFblc81sp1qVN9XNa6spBwNOsekqrH15cPSoC1sVUKTbVYlMptvbE9K3YUsc-VVvbSvVQLR4qxRrn0zYffaYUj9TOI6X4XC0-bxObajqmK5m6ZVRTM9qqZ1RTNFtjrm4a1VSNqrv2Nvty89-fAAAA___XIrJ-
# Regression test for #35950: Make sure that lookup joins use a batch limit.
diff --git a/pkg/sql/physicalplan/physical_plan.go b/pkg/sql/physicalplan/physical_plan.go
index 62a0026f97a1..5c3f6eab4bdb 100644
--- a/pkg/sql/physicalplan/physical_plan.go
+++ b/pkg/sql/physicalplan/physical_plan.go
@@ -15,7 +15,6 @@
package physicalplan
import (
- "fmt"
"math"
"github.com/cockroachdb/cockroach/pkg/roachpb"
@@ -441,8 +440,7 @@ func (p *PhysicalPlan) CheckLastStagePost() error {
// verify this assumption.
for i := 1; i < len(p.ResultRouters); i++ {
pi := &p.Processors[p.ResultRouters[i]].Spec.Post
- if pi.Filter != post.Filter ||
- pi.Projection != post.Projection ||
+ if pi.Projection != post.Projection ||
len(pi.OutputColumns) != len(post.OutputColumns) ||
len(pi.RenderExprs) != len(post.RenderExprs) {
return errors.Errorf("inconsistent post-processing: %v vs %v", post, pi)
@@ -760,49 +758,18 @@ func (p *PhysicalPlan) AddFilter(
if expr == nil {
return errors.Errorf("nil filter")
}
- post := p.GetLastStagePost()
- if len(post.RenderExprs) > 0 || post.Offset != 0 || post.Limit != 0 {
- // The last stage contains render expressions or a limit. The filter refers
- // to the output as described by the existing spec, so we need to add
- // another "no-op" stage to which to attach the filter.
- //
- // In general, we might be able to push the filter "through" the rendering;
- // but the higher level planning code should figure this out when
- // propagating filters.
- post = execinfrapb.PostProcessSpec{}
- p.AddNoGroupingStage(
- execinfrapb.ProcessorCoreUnion{Noop: &execinfrapb.NoopCoreSpec{}},
- post,
- p.GetResultTypes(),
- p.MergeOrdering,
- )
- }
-
- compositeMap := indexVarMap
- if post.Projection {
- compositeMap = reverseProjection(post.OutputColumns, indexVarMap)
- }
- filter, err := MakeExpression(expr, exprCtx, compositeMap)
+ filter, err := MakeExpression(expr, exprCtx, indexVarMap)
if err != nil {
return err
}
- if !post.Filter.Empty() {
- // LocalExpr is usually set, but it can be left nil in tests, so we
- // need to perform the nil check.
- if post.Filter.LocalExpr != nil && filter.LocalExpr != nil {
- filter.LocalExpr = tree.NewTypedAndExpr(
- post.Filter.LocalExpr,
- filter.LocalExpr,
- )
- }
- // Expr is set for all distributed plans (as well as in some tests).
- if post.Filter.Expr != "" && filter.Expr != "" {
- filter.Expr = fmt.Sprintf("(%s) AND (%s)", post.Filter.Expr, filter.Expr)
- }
- }
- for _, pIdx := range p.ResultRouters {
- p.Processors[pIdx].Spec.Post.Filter = filter
- }
+ p.AddNoGroupingStage(
+ execinfrapb.ProcessorCoreUnion{Filterer: &execinfrapb.FiltererSpec{
+ Filter: filter,
+ }},
+ execinfrapb.PostProcessSpec{},
+ p.GetResultTypes(),
+ p.MergeOrdering,
+ )
return nil
}
diff --git a/pkg/sql/physicalplan/physical_plan_test.go b/pkg/sql/physicalplan/physical_plan_test.go
index 4c5b98ef7723..873666418085 100644
--- a/pkg/sql/physicalplan/physical_plan_test.go
+++ b/pkg/sql/physicalplan/physical_plan_test.go
@@ -351,7 +351,6 @@ func TestProjectionAndRendering(t *testing.T) {
// expressions, however, we don't do that for the expected results. In
// order to be able to use the deep comparison below we manually unset
// that unserialized field.
- post.Filter.LocalExpr = nil
for i := range post.RenderExprs {
post.RenderExprs[i].LocalExpr = nil
}
diff --git a/pkg/sql/rowenc/testutils.go b/pkg/sql/rowenc/testutils.go
index c42522f585ca..e3af5131db9a 100644
--- a/pkg/sql/rowenc/testutils.go
+++ b/pkg/sql/rowenc/testutils.go
@@ -1619,11 +1619,6 @@ func IntEncDatum(i int) EncDatum {
return EncDatum{Datum: tree.NewDInt(tree.DInt(i))}
}
-// StrEncDatum returns an EncDatum representation of DString(s).
-func StrEncDatum(s string) EncDatum {
- return EncDatum{Datum: tree.NewDString(s)}
-}
-
// NullEncDatum returns and EncDatum representation of tree.DNull.
func NullEncDatum() EncDatum {
return EncDatum{Datum: tree.DNull}
diff --git a/pkg/sql/rowexec/BUILD.bazel b/pkg/sql/rowexec/BUILD.bazel
index 35de3607c3fa..a0d555ce5b9f 100644
--- a/pkg/sql/rowexec/BUILD.bazel
+++ b/pkg/sql/rowexec/BUILD.bazel
@@ -9,6 +9,7 @@ go_library(
"columnbackfiller.go",
"countrows.go",
"distinct.go",
+ "filterer.go",
"hashjoiner.go",
"indexbackfiller.go",
"inverted_expr_evaluator.go",
@@ -97,6 +98,7 @@ go_test(
"backfiller_test.go",
"dep_test.go",
"distinct_test.go",
+ "filterer_test.go",
"hashjoiner_test.go",
"inverted_expr_evaluator_test.go",
"inverted_filterer_test.go",
diff --git a/pkg/sql/rowexec/filterer.go b/pkg/sql/rowexec/filterer.go
new file mode 100644
index 000000000000..c975ea7761b2
--- /dev/null
+++ b/pkg/sql/rowexec/filterer.go
@@ -0,0 +1,145 @@
+// Copyright 2020 The Cockroach Authors.
+//
+// Use of this software is governed by the Business Source License
+// included in the file licenses/BSL.txt.
+//
+// As of the Change Date specified in that file, in accordance with
+// the Business Source License, use of this software will be governed
+// by the Apache License, Version 2.0, included in the file
+// licenses/APL.txt.
+
+package rowexec
+
+import (
+ "context"
+
+ "github.com/cockroachdb/cockroach/pkg/sql/execinfra"
+ "github.com/cockroachdb/cockroach/pkg/sql/execinfrapb"
+ "github.com/cockroachdb/cockroach/pkg/sql/rowenc"
+ "github.com/cockroachdb/cockroach/pkg/util/tracing"
+ "github.com/cockroachdb/errors"
+)
+
+// filtererProcessor is a processor that filters input rows according to a
+// boolean expression.
+type filtererProcessor struct {
+ execinfra.ProcessorBase
+ input execinfra.RowSource
+ filter *execinfrapb.ExprHelper
+}
+
+var _ execinfra.Processor = &filtererProcessor{}
+var _ execinfra.RowSource = &filtererProcessor{}
+var _ execinfra.OpNode = &filtererProcessor{}
+
+const filtererProcName = "filterer"
+
+func newFiltererProcessor(
+ flowCtx *execinfra.FlowCtx,
+ processorID int32,
+ spec *execinfrapb.FiltererSpec,
+ input execinfra.RowSource,
+ post *execinfrapb.PostProcessSpec,
+ output execinfra.RowReceiver,
+) (*filtererProcessor, error) {
+ f := &filtererProcessor{input: input}
+ types := input.OutputTypes()
+ if err := f.Init(
+ f,
+ post,
+ types,
+ flowCtx,
+ processorID,
+ output,
+ nil, /* memMonitor */
+ execinfra.ProcStateOpts{InputsToDrain: []execinfra.RowSource{f.input}},
+ ); err != nil {
+ return nil, err
+ }
+
+ f.filter = &execinfrapb.ExprHelper{}
+ if err := f.filter.Init(spec.Filter, types, &f.SemaCtx, f.EvalCtx); err != nil {
+ return nil, err
+ }
+
+ ctx := flowCtx.EvalCtx.Ctx()
+ if sp := tracing.SpanFromContext(ctx); sp != nil && sp.IsRecording() {
+ f.input = newInputStatCollector(f.input)
+ f.ExecStatsForTrace = f.execStatsForTrace
+ }
+ return f, nil
+}
+
+// Start is part of the RowSource interface.
+func (f *filtererProcessor) Start(ctx context.Context) context.Context {
+ f.input.Start(ctx)
+ return f.StartInternal(ctx, filtererProcName)
+}
+
+// Next is part of the RowSource interface.
+func (f *filtererProcessor) Next() (rowenc.EncDatumRow, *execinfrapb.ProducerMetadata) {
+ for f.State == execinfra.StateRunning {
+ row, meta := f.input.Next()
+
+ if meta != nil {
+ if meta.Err != nil {
+ f.MoveToDraining(nil /* err */)
+ }
+ return nil, meta
+ }
+ if row == nil {
+ f.MoveToDraining(nil /* err */)
+ break
+ }
+
+ // Perform the actual filtering.
+ passes, err := f.filter.EvalFilter(row)
+ if err != nil {
+ f.MoveToDraining(err)
+ break
+ }
+ if passes {
+ if outRow := f.ProcessRowHelper(row); outRow != nil {
+ return outRow, nil
+ }
+ }
+ }
+ return nil, f.DrainHelper()
+}
+
+// ConsumerClosed is part of the RowSource interface.
+func (f *filtererProcessor) ConsumerClosed() {
+ // The consumer is done, Next() will not be called again.
+ f.InternalClose()
+}
+
+// execStatsForTrace implements ProcessorBase.ExecStatsForTrace.
+func (f *filtererProcessor) execStatsForTrace() *execinfrapb.ComponentStats {
+ is, ok := getInputStats(f.input)
+ if !ok {
+ return nil
+ }
+ return &execinfrapb.ComponentStats{
+ Inputs: []execinfrapb.InputStats{is},
+ Output: f.Out.Stats(),
+ }
+}
+
+// ChildCount is part of the execinfra.OpNode interface.
+func (f *filtererProcessor) ChildCount(bool) int {
+ if _, ok := f.input.(execinfra.OpNode); ok {
+ return 1
+ }
+ return 0
+}
+
+// Child is part of the execinfra.OpNode interface.
+func (f *filtererProcessor) Child(nth int, _ bool) execinfra.OpNode {
+ if nth == 0 {
+ if n, ok := f.input.(execinfra.OpNode); ok {
+ return n
+ }
+ panic("input to filterer is not an execinfra.OpNode")
+ }
+ panic(errors.AssertionFailedf("invalid index %d", nth))
+}
diff --git a/pkg/sql/rowexec/filterer_test.go b/pkg/sql/rowexec/filterer_test.go
new file mode 100644
index 000000000000..4a7f361aec9a
--- /dev/null
+++ b/pkg/sql/rowexec/filterer_test.go
@@ -0,0 +1,154 @@
+// Copyright 2020 The Cockroach Authors.
+//
+// Use of this software is governed by the Business Source License
+// included in the file licenses/BSL.txt.
+//
+// As of the Change Date specified in that file, in accordance with
+// the Business Source License, use of this software will be governed
+// by the Apache License, Version 2.0, included in the file
+// licenses/APL.txt.
+
+package rowexec
+
+import (
+ "context"
+ "fmt"
+ "testing"
+
+ "github.com/cockroachdb/cockroach/pkg/settings/cluster"
+ "github.com/cockroachdb/cockroach/pkg/sql/execinfra"
+ "github.com/cockroachdb/cockroach/pkg/sql/execinfrapb"
+ "github.com/cockroachdb/cockroach/pkg/sql/rowenc"
+ "github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
+ "github.com/cockroachdb/cockroach/pkg/sql/types"
+ "github.com/cockroachdb/cockroach/pkg/testutils/distsqlutils"
+ "github.com/cockroachdb/cockroach/pkg/util/leaktest"
+)
+
+func TestFilterer(t *testing.T) {
+ defer leaktest.AfterTest(t)()
+ v := [10]rowenc.EncDatum{}
+ for i := range v {
+ v[i] = rowenc.DatumToEncDatum(types.Int, tree.NewDInt(tree.DInt(i)))
+ }
+
+ // We run the same input rows through various PostProcessSpecs.
+ input := rowenc.EncDatumRows{
+ {v[0], v[1], v[2]},
+ {v[0], v[1], v[3]},
+ {v[0], v[1], v[4]},
+ {v[0], v[2], v[3]},
+ {v[0], v[2], v[4]},
+ {v[0], v[3], v[4]},
+ {v[1], v[2], v[3]},
+ {v[1], v[2], v[4]},
+ {v[1], v[3], v[4]},
+ {v[2], v[3], v[4]},
+ }
+
+ testCases := []struct {
+ filter string
+ post execinfrapb.PostProcessSpec
+ expected string
+ }{
+ {
+ filter: "@1 = 1",
+ expected: "[[1 2 3] [1 2 4] [1 3 4]]",
+ },
+ {
+ filter: "(@1 + @2) % 2 = 0",
+ expected: "[[0 2 3] [0 2 4] [1 3 4]]",
+ },
+ {
+ filter: "@2 % 2 <> @3 % 2",
+ post: execinfrapb.PostProcessSpec{
+ Limit: 4,
+ Offset: 1,
+ },
+ expected: "[[0 1 4] [0 2 3] [0 3 4] [1 2 3]]",
+ },
+ }
+
+ for _, c := range testCases {
+ t.Run("", func(t *testing.T) {
+
+ in := distsqlutils.NewRowBuffer(rowenc.ThreeIntCols, input, distsqlutils.RowBufferArgs{})
+ out := &distsqlutils.RowBuffer{}
+
+ st := cluster.MakeTestingClusterSettings()
+ evalCtx := tree.MakeTestingEvalContext(st)
+ defer evalCtx.Stop(context.Background())
+ flowCtx := execinfra.FlowCtx{
+ Cfg: &execinfra.ServerConfig{Settings: st},
+ EvalCtx: &evalCtx,
+ }
+ spec := execinfrapb.FiltererSpec{
+ Filter: execinfrapb.Expression{Expr: c.filter},
+ }
+
+ d, err := newFiltererProcessor(&flowCtx, 0 /* processorID */, &spec, in, &c.post, out)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ d.Run(context.Background())
+ if !out.ProducerClosed() {
+ t.Fatalf("output RowReceiver not closed")
+ }
+ var res rowenc.EncDatumRows
+ for {
+ row := out.NextNoMeta(t).Copy()
+ if row == nil {
+ break
+ }
+ res = append(res, row)
+ }
+
+ if result := res.String(rowenc.ThreeIntCols); result != c.expected {
+ t.Errorf("invalid results: %s, expected %s", result, c.expected)
+ }
+ })
+ }
+}
+
+func BenchmarkFilterer(b *testing.B) {
+ const numRows = 1 << 16
+
+ ctx := context.Background()
+ st := cluster.MakeTestingClusterSettings()
+ evalCtx := tree.MakeTestingEvalContext(st)
+ defer evalCtx.Stop(ctx)
+
+ flowCtx := &execinfra.FlowCtx{
+ Cfg: &execinfra.ServerConfig{Settings: st},
+ EvalCtx: &evalCtx,
+ }
+ post := &execinfrapb.PostProcessSpec{}
+ disposer := &rowDisposer{}
+ for _, numCols := range []int{1, 1 << 1, 1 << 2, 1 << 4, 1 << 8} {
+ b.Run(fmt.Sprintf("cols=%d", numCols), func(b *testing.B) {
+ cols := make([]*types.T, numCols)
+ for i := range cols {
+ cols[i] = types.Int
+ }
+ input := execinfra.NewRepeatableRowSource(cols, rowenc.MakeIntRows(numRows, numCols))
+
+ var spec execinfrapb.FiltererSpec
+ if numCols == 1 {
+ spec.Filter.Expr = "@1 % 2 = 0"
+ } else {
+ spec.Filter.Expr = "@1 % 2 = @2 % 3"
+ }
+ b.SetBytes(int64(8 * numRows * numCols))
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ d, err := newFiltererProcessor(flowCtx, 0 /* processorID */, &spec, input, post, disposer)
+ if err != nil {
+ b.Fatal(err)
+ }
+ d.Run(context.Background())
+ input.Reset()
+ }
+ })
+ }
+}
diff --git a/pkg/sql/rowexec/inverted_filterer.go b/pkg/sql/rowexec/inverted_filterer.go
index 779e8d2b0d18..aec1d10e9ae2 100644
--- a/pkg/sql/rowexec/inverted_filterer.go
+++ b/pkg/sql/rowexec/inverted_filterer.go
@@ -286,8 +286,7 @@ func (ifr *invertedFilterer) close() {
}
}
-// execStatsForTrace outputs the collected invertedFilterer stats to the
-// trace. Will fail silently if the invertedFilterer is not collecting stats.
+// execStatsForTrace implements ProcessorBase.ExecStatsForTrace.
func (ifr *invertedFilterer) execStatsForTrace() *execinfrapb.ComponentStats {
is, ok := getInputStats(ifr.input)
if !ok {
diff --git a/pkg/sql/rowexec/joinreader.go b/pkg/sql/rowexec/joinreader.go
index c5e3c52ec53c..96fa12a4b6ca 100644
--- a/pkg/sql/rowexec/joinreader.go
+++ b/pkg/sql/rowexec/joinreader.go
@@ -674,8 +674,7 @@ func (jr *joinReader) close() {
}
}
-// execStatsForTrace outputs the collected joinReader stats to the trace. Will
-// fail silently if the joinReader is not collecting stats.
+// execStatsForTrace implements ProcessorBase.ExecStatsForTrace.
func (jr *joinReader) execStatsForTrace() *execinfrapb.ComponentStats {
is, ok := getInputStats(jr.input)
if !ok {
diff --git a/pkg/sql/rowexec/joinreader_test.go b/pkg/sql/rowexec/joinreader_test.go
index 483ababf6fad..ca2fd90082c0 100644
--- a/pkg/sql/rowexec/joinreader_test.go
+++ b/pkg/sql/rowexec/joinreader_test.go
@@ -1085,33 +1085,6 @@ func TestIndexJoiner(t *testing.T) {
{v[1], v[5], v[6]},
},
},
- {
- description: "Test a filter in the post process spec and using a secondary index",
- desc: td.TableDesc(),
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@3 <= 5"}, // sum <= 5
- Projection: true,
- OutputColumns: []uint32{3},
- },
- input: rowenc.EncDatumRows{
- {v[0], v[1]},
- {v[2], v[5]},
- {v[0], v[5]},
- {v[2], v[1]},
- {v[3], v[4]},
- {v[1], v[3]},
- {v[5], v[1]},
- {v[5], v[0]},
- },
- outputTypes: []*types.T{types.String},
- expected: rowenc.EncDatumRows{
- {rowenc.StrEncDatum("one")},
- {rowenc.StrEncDatum("five")},
- {rowenc.StrEncDatum("two-one")},
- {rowenc.StrEncDatum("one-three")},
- {rowenc.StrEncDatum("five-zero")},
- },
- },
{
description: "Test selecting rows using the primary index with multiple family spans",
desc: tdf.TableDesc(),
diff --git a/pkg/sql/rowexec/noop.go b/pkg/sql/rowexec/noop.go
index 3f2b0e094acd..9aa7c0f8ad43 100644
--- a/pkg/sql/rowexec/noop.go
+++ b/pkg/sql/rowexec/noop.go
@@ -16,6 +16,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/execinfra"
"github.com/cockroachdb/cockroach/pkg/sql/execinfrapb"
"github.com/cockroachdb/cockroach/pkg/sql/rowenc"
+ "github.com/cockroachdb/cockroach/pkg/util/tracing"
"github.com/cockroachdb/errors"
)
@@ -54,6 +55,11 @@ func newNoopProcessor(
); err != nil {
return nil, err
}
+ ctx := flowCtx.EvalCtx.Ctx()
+ if sp := tracing.SpanFromContext(ctx); sp != nil && sp.IsRecording() {
+ n.input = newInputStatCollector(n.input)
+ n.ExecStatsForTrace = n.execStatsForTrace
+ }
return n, nil
}
@@ -92,6 +98,18 @@ func (n *noopProcessor) ConsumerClosed() {
n.InternalClose()
}
+// execStatsForTrace implements ProcessorBase.ExecStatsForTrace.
+func (n *noopProcessor) execStatsForTrace() *execinfrapb.ComponentStats {
+ is, ok := getInputStats(n.input)
+ if !ok {
+ return nil
+ }
+ return &execinfrapb.ComponentStats{
+ Inputs: []execinfrapb.InputStats{is},
+ Output: n.Out.Stats(),
+ }
+}
+
// ChildCount is part of the execinfra.OpNode interface.
func (n *noopProcessor) ChildCount(bool) int {
if _, ok := n.input.(execinfra.OpNode); ok {
diff --git a/pkg/sql/rowexec/ordinality.go b/pkg/sql/rowexec/ordinality.go
index ff064c380ef4..e9d298d99cf3 100644
--- a/pkg/sql/rowexec/ordinality.go
+++ b/pkg/sql/rowexec/ordinality.go
@@ -114,8 +114,7 @@ func (o *ordinalityProcessor) ConsumerClosed() {
o.InternalClose()
}
-// execStatsForTrace outputs the collected distinct stats to the trace. Will
-// fail silently if the Distinct processor is not collecting stats.
+// execStatsForTrace implements ProcessorBase.ExecStatsForTrace.
func (o *ordinalityProcessor) execStatsForTrace() *execinfrapb.ComponentStats {
is, ok := getInputStats(o.input)
if !ok {
diff --git a/pkg/sql/rowexec/processors.go b/pkg/sql/rowexec/processors.go
index 90ef1b0ec1d2..5ed316c1c1bc 100644
--- a/pkg/sql/rowexec/processors.go
+++ b/pkg/sql/rowexec/processors.go
@@ -137,6 +137,12 @@ func NewProcessor(
}
return newTableReader(flowCtx, processorID, core.TableReader, post, outputs[0])
}
+ if core.Filterer != nil {
+ if err := checkNumInOut(inputs, outputs, 1, 1); err != nil {
+ return nil, err
+ }
+ return newFiltererProcessor(flowCtx, processorID, core.Filterer, inputs[0], post, outputs[0])
+ }
if core.JoinReader != nil {
if err := checkNumInOut(inputs, outputs, 1, 1); err != nil {
return nil, err
diff --git a/pkg/sql/rowexec/processors_test.go b/pkg/sql/rowexec/processors_test.go
index 9fef1d073f54..fad5ef45db8b 100644
--- a/pkg/sql/rowexec/processors_test.go
+++ b/pkg/sql/rowexec/processors_test.go
@@ -82,16 +82,6 @@ func TestPostProcess(t *testing.T) {
expected: "[[0 1 2] [0 1 3] [0 1 4] [0 2 3] [0 2 4] [0 3 4] [1 2 3] [1 2 4] [1 3 4] [2 3 4]]",
},
- // Filter.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 = 1"},
- },
- outputTypes: rowenc.ThreeIntCols,
- expNeededCols: []int{0, 1, 2},
- expected: "[[1 2 3] [1 2 4] [1 3 4]]",
- },
-
// Projection.
{
post: execinfrapb.PostProcessSpec{
@@ -103,30 +93,6 @@ func TestPostProcess(t *testing.T) {
expected: "[[0 2] [0 3] [0 4] [0 3] [0 4] [0 4] [1 3] [1 4] [1 4] [2 4]]",
},
- // Filter and projection; filter only refers to projected column.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 = 1"},
- Projection: true,
- OutputColumns: []uint32{0, 2},
- },
- outputTypes: rowenc.TwoIntCols,
- expNeededCols: []int{0, 2},
- expected: "[[1 3] [1 4] [1 4]]",
- },
-
- // Filter and projection; filter refers to non-projected column.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@2 = 2"},
- Projection: true,
- OutputColumns: []uint32{0, 2},
- },
- outputTypes: rowenc.TwoIntCols,
- expNeededCols: []int{0, 1, 2},
- expected: "[[0 3] [0 4] [1 3] [1 4]]",
- },
-
// Rendering.
{
post: execinfrapb.PostProcessSpec{
@@ -137,28 +103,6 @@ func TestPostProcess(t *testing.T) {
expected: "[[0 1 1] [0 1 1] [0 1 1] [0 2 2] [0 2 2] [0 3 3] [1 2 3] [1 2 3] [1 3 4] [2 3 5]]",
},
- // Rendering and filtering; filter refers to column used in rendering.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@2 = 2"},
- RenderExprs: []execinfrapb.Expression{{Expr: "@1"}, {Expr: "@2"}, {Expr: "@1 + @2"}},
- },
- outputTypes: rowenc.ThreeIntCols,
- expNeededCols: []int{0, 1},
- expected: "[[0 2 2] [0 2 2] [1 2 3] [1 2 3]]",
- },
-
- // Rendering and filtering; filter refers to column not used in rendering.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@3 = 4"},
- RenderExprs: []execinfrapb.Expression{{Expr: "@1"}, {Expr: "@2"}, {Expr: "@1 + @2"}},
- },
- outputTypes: rowenc.ThreeIntCols,
- expNeededCols: []int{0, 1, 2},
- expected: "[[0 1 1] [0 2 2] [0 3 3] [1 2 3] [1 3 4] [2 3 5]]",
- },
-
// More complex rendering expressions.
{
post: execinfrapb.PostProcessSpec{
@@ -246,28 +190,6 @@ func TestPostProcess(t *testing.T) {
expNeededCols: []int{0, 1, 2},
expected: "[[0 2 3] [0 2 4] [0 3 4] [1 2 3] [1 2 4] [1 3 4] [2 3 4]]",
},
-
- // Filter + offset.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 = 1"},
- Offset: 1,
- },
- outputTypes: rowenc.ThreeIntCols,
- expNeededCols: []int{0, 1, 2},
- expected: "[[1 2 4] [1 3 4]]",
- },
-
- // Filter + limit.
- {
- post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 = 1"},
- Limit: 2,
- },
- outputTypes: rowenc.ThreeIntCols,
- expNeededCols: []int{0, 1, 2},
- expected: "[[1 2 3] [1 2 4]]",
- },
}
for tcIdx, tc := range testCases {
diff --git a/pkg/sql/rowexec/sorter.go b/pkg/sql/rowexec/sorter.go
index 17d9e8a00b5b..4411b5c0972a 100644
--- a/pkg/sql/rowexec/sorter.go
+++ b/pkg/sql/rowexec/sorter.go
@@ -152,7 +152,7 @@ func newSorter(
output execinfra.RowReceiver,
) (execinfra.Processor, error) {
count := uint64(0)
- if post.Limit != 0 && post.Filter.Empty() {
+ if post.Limit != 0 {
// The sorter needs to produce Offset + Limit rows. The ProcOutputHelper
// will discard the first Offset ones.
if post.Limit <= math.MaxUint64-post.Offset {
diff --git a/pkg/sql/rowexec/sorter_test.go b/pkg/sql/rowexec/sorter_test.go
index ff3cb74e500a..3d23fa14fe34 100644
--- a/pkg/sql/rowexec/sorter_test.go
+++ b/pkg/sql/rowexec/sorter_test.go
@@ -137,34 +137,6 @@ func TestSorter(t *testing.T) {
{v[3], v[2], v[0]},
{v[3], v[3], v[0]},
},
- }, {
- name: "SortFilterExpr",
- // No specified input ordering but specified postprocess filter expression.
- spec: execinfrapb.SorterSpec{
- OutputOrdering: execinfrapb.ConvertToSpecOrdering(
- colinfo.ColumnOrdering{
- {ColIdx: 0, Direction: asc},
- {ColIdx: 1, Direction: asc},
- {ColIdx: 2, Direction: asc},
- }),
- },
- post: execinfrapb.PostProcessSpec{Filter: execinfrapb.Expression{Expr: "@1 + @2 < 7"}},
- types: rowenc.ThreeIntCols,
- input: rowenc.EncDatumRows{
- {v[3], v[3], v[0]},
- {v[3], v[4], v[1]},
- {v[1], v[0], v[4]},
- {v[0], v[0], v[0]},
- {v[4], v[4], v[4]},
- {v[4], v[4], v[5]},
- {v[3], v[2], v[0]},
- },
- expected: rowenc.EncDatumRows{
- {v[0], v[0], v[0]},
- {v[1], v[0], v[4]},
- {v[3], v[2], v[0]},
- {v[3], v[3], v[0]},
- },
}, {
name: "SortMatchOrderingNoLimit",
// Specified match ordering length but no specified limit.
diff --git a/pkg/sql/rowexec/tablereader_test.go b/pkg/sql/rowexec/tablereader_test.go
index bc8efef32249..3e8abc08b0ae 100644
--- a/pkg/sql/rowexec/tablereader_test.go
+++ b/pkg/sql/rowexec/tablereader_test.go
@@ -64,7 +64,7 @@ func TestTableReader(t *testing.T) {
sqlutils.CreateTable(t, sqlDB, "t",
"a INT, b INT, sum INT, s STRING, PRIMARY KEY (a,b), INDEX bs (b,s)",
- 99,
+ 19,
sqlutils.ToRowFn(aFn, bFn, sumFn, sqlutils.RowEnglishFn))
td := catalogkv.TestingGetTableDescriptor(kvDB, keys.SystemSQLCodec, "test", "t")
@@ -88,23 +88,21 @@ func TestTableReader(t *testing.T) {
Spans: []execinfrapb.TableReaderSpan{{Span: td.PrimaryIndexSpan(keys.SystemSQLCodec)}},
},
post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@3 < 5 AND @2 != 3"}, // sum < 5 && b != 3
Projection: true,
OutputColumns: []uint32{0, 1},
},
- expected: "[[0 1] [0 2] [0 4] [1 0] [1 1] [1 2] [2 0] [2 1] [2 2] [3 0] [3 1] [4 0]]",
+ expected: "[[0 1] [0 2] [0 3] [0 4] [0 5] [0 6] [0 7] [0 8] [0 9] [1 0] [1 1] [1 2] [1 3] [1 4] [1 5] [1 6] [1 7] [1 8] [1 9]]",
},
{
spec: execinfrapb.TableReaderSpec{
Spans: []execinfrapb.TableReaderSpan{{Span: td.PrimaryIndexSpan(keys.SystemSQLCodec)}},
},
post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@3 < 5 AND @2 != 3"},
Projection: true,
OutputColumns: []uint32{3}, // s
Limit: 4,
},
- expected: "[['one'] ['two'] ['four'] ['one-zero']]",
+ expected: "[['one'] ['two'] ['three'] ['four']]",
},
{
spec: execinfrapb.TableReaderSpec{
@@ -114,11 +112,10 @@ func TestTableReader(t *testing.T) {
LimitHint: 1,
},
post: execinfrapb.PostProcessSpec{
- Filter: execinfrapb.Expression{Expr: "@1 < 3"}, // sum < 8
Projection: true,
OutputColumns: []uint32{0, 1},
},
- expected: "[[2 5] [1 5] [0 5] [2 4] [1 4] [0 4]]",
+ expected: "[[1 5] [0 5] [1 4] [0 4]]",
},
}
diff --git a/pkg/sql/schema_changer_test.go b/pkg/sql/schema_changer_test.go
index b521bd2b03e9..c1c9861da1bb 100644
--- a/pkg/sql/schema_changer_test.go
+++ b/pkg/sql/schema_changer_test.go
@@ -6349,14 +6349,12 @@ func TestFailureToMarkCanceledReversalLeadsToCanceledStatus(t *testing.T) {
SQLSchemaChanger: &sql.SchemaChangerTestingKnobs{
RunBeforeBackfill: func() error {
<-canProceed
- log.Infof(context.Background(), "went")
return nil
},
},
JobsTestingKnobs: &jobs.TestingKnobs{
BeforeUpdate: func(orig, updated jobs.JobMetadata) (err error) {
withJobsToFail(func(m map[int64]struct{}) {
- log.Infof(context.Background(), "here %v %v", orig, m)
if _, ok := m[orig.ID]; ok && updated.Status == jobs.StatusCanceled {
delete(m, orig.ID)
err = errors.Errorf("boom")
diff --git a/pkg/sql/sem/builtins/geo_builtins.go b/pkg/sql/sem/builtins/geo_builtins.go
index c2bdf21788fe..cdb49c16d25c 100644
--- a/pkg/sql/sem/builtins/geo_builtins.go
+++ b/pkg/sql/sem/builtins/geo_builtins.go
@@ -409,6 +409,52 @@ func (m *minimumBoundRadiusGen) Values() (tree.Datums, error) {
func (m *minimumBoundRadiusGen) Close() {}
+func makeSubdividedGeometriesGeneratorFactory(expectMaxVerticesArg bool) tree.GeneratorFactory {
+ return func(
+ ctx *tree.EvalContext, args tree.Datums,
+ ) (tree.ValueGenerator, error) {
+ geometry := tree.MustBeDGeometry(args[0])
+ var maxVertices int
+ if expectMaxVerticesArg {
+ maxVertices = int(tree.MustBeDInt(args[1]))
+ } else {
+ maxVertices = 256
+ }
+ results, err := geomfn.Subdivide(geometry.Geometry, maxVertices)
+ if err != nil {
+ return nil, err
+ }
+ return &subdividedGeometriesGen{
+ geometries: results,
+ curr: -1,
+ }, nil
+ }
+}
+
+// subdividedGeometriesGen implements the tree.ValueGenerator interface
+type subdividedGeometriesGen struct {
+ geometries []geo.Geometry
+ curr int
+}
+
+func (s *subdividedGeometriesGen) ResolvedType() *types.T { return types.Geometry }
+
+func (s *subdividedGeometriesGen) Close() {}
+
+func (s *subdividedGeometriesGen) Start(_ context.Context, _ *kv.Txn) error {
+ s.curr = -1
+ return nil
+}
+
+func (s *subdividedGeometriesGen) Values() (tree.Datums, error) {
+ return tree.Datums{tree.NewDGeometry(s.geometries[s.curr])}, nil
+}
+
+func (s *subdividedGeometriesGen) Next(_ context.Context) (bool, error) {
+ s.curr++
+ return s.curr < len(s.geometries), nil
+}
+
var geoBuiltins = map[string]builtinDefinition{
//
// Meta builtins.
@@ -1935,21 +1981,7 @@ Flags shown square brackets after the geometry type have the following meaning:
if err != nil {
return nil, err
}
- var nPoints func(t geom.T) int
- nPoints = func(t geom.T) int {
- switch t := t.(type) {
- case *geom.GeometryCollection:
- // FlatCoords() does not work on GeometryCollection.
- numPoints := 0
- for _, g := range t.Geoms() {
- numPoints += nPoints(g)
- }
- return numPoints
- default:
- return len(t.FlatCoords()) / t.Stride()
- }
- }
- return tree.NewDInt(tree.DInt(nPoints(t))), nil
+ return tree.NewDInt(tree.DInt(geomfn.CountVertices(t))), nil
},
types.Int,
infoBuilder{
@@ -5014,6 +5046,28 @@ See http://developers.google.com/maps/documentation/utilities/polylinealgorithm`
tree.VolatilityImmutable,
),
),
+ "st_subdivide": makeBuiltin(
+ genProps(),
+ makeGeneratorOverload(
+ tree.ArgTypes{
+ {"geometry", types.Geometry},
+ },
+ types.Geometry,
+ makeSubdividedGeometriesGeneratorFactory(false /* expectMaxVerticesArg */),
+ "Returns a geometry divided into parts, where each part contains no more than 256 vertices.",
+ tree.VolatilityImmutable,
+ ),
+ makeGeneratorOverload(
+ tree.ArgTypes{
+ {"geometry", types.Geometry},
+ {"max_vertices", types.Int4},
+ },
+ types.Geometry,
+ makeSubdividedGeometriesGeneratorFactory(true /* expectMaxVerticesArg */),
+ "Returns a geometry divided into parts, where each part contains no more than the number of vertices provided.",
+ tree.VolatilityImmutable,
+ ),
+ ),
//
// BoundingBox
@@ -5681,7 +5735,6 @@ See http://developers.google.com/maps/documentation/utilities/polylinealgorithm`
"st_simplifyvw": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49039}),
"st_snap": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49040}),
"st_split": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49045}),
- "st_subdivide": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49048}),
"st_tileenvelope": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49053}),
"st_voronoilines": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49065}),
"st_voronoipolygons": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 49066}),
|