diff --git a/runtime/op/join/join.go b/runtime/op/join/join.go index d4238a93b4..e115d3abd5 100644 --- a/runtime/op/join/join.go +++ b/runtime/op/join/join.go @@ -50,13 +50,13 @@ func New(octx *op.Context, anti, inner bool, left, right zbuf.Puller, leftKey, r } // Add sorts if needed. if !leftDir.HasOrder(o) { - left, err = sort.New(octx, left, []expr.Evaluator{leftKey}, o, true) + left, err = sort.New(octx, left, []expr.Evaluator{leftKey}, o, false) if err != nil { return nil, err } } if !rightDir.HasOrder(o) { - right, err = sort.New(octx, right, []expr.Evaluator{rightKey}, o, true) + right, err = sort.New(octx, right, []expr.Evaluator{rightKey}, o, false) if err != nil { return nil, err } diff --git a/runtime/op/join/ztests/auto-sort.yaml b/runtime/op/join/ztests/auto-sort.yaml index e6a5f76ba3..56c17167e9 100644 --- a/runtime/op/join/ztests/auto-sort.yaml +++ b/runtime/op/join/ztests/auto-sort.yaml @@ -14,30 +14,38 @@ script: | inputs: - name: a.zson data: | + {a:null(int64)} {a:1} {a:2} - name: b.zson data: | {b:2} {b:1} + {b:null(int64)} outputs: - name: stdout data: | {a:1} {a:2} + {a:null(int64)} // === {a:2} {a:1} + {a:null(int64)} // === {a:1} {a:2} + {a:null(int64)} // === {a:1} {a:2} + {a:null(int64)} // === {a:2} {a:1} + {a:null(int64)} // === {a:2} {a:1} + {a:null(int64)}