don't use reflection to check unitialised joinRset

Check for unitialized joinRset given r is `*joinRset` is

`len(r.sources) == 0 && r.typ == 0 && r.on == nil`
parent 0b09dcaf
......@@ -1616,7 +1616,7 @@ type joinRset struct {
}
func (r *joinRset) isZero() bool {
return len(r.sources) == 0 && r.typ == 0 && !valid(r.on)
return len(r.sources) == 0 && r.typ == 0 && r.on == nil
}
......
......@@ -9,8 +9,6 @@ import (
"fmt"
"strings"
"reflect"
"github.com/cznic/strutil"
)
......@@ -783,10 +781,6 @@ func (s *selectStmt) String() string {
return b.String()
}
func valid(v interface{}) bool {
return reflect.ValueOf(v).IsValid()
}
func (s *selectStmt) plan(ctx *execCtx) (plan, error) { //LATER overlapping goroutines/pipelines
var r plan
var err error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment