Begin resolving issue155

parent 5078e40c
......@@ -1616,6 +1616,9 @@ type joinRset struct {
}
func (r *joinRset) String() string {
if len(r.sources) == 0 {
return ""
}
a := make([]string, len(r.sources))
for i, pair0 := range r.sources {
pair := pair0.([]interface{})
......@@ -1658,6 +1661,9 @@ func (r *joinRset) String() string {
}
func (r *joinRset) plan(ctx *execCtx) (plan, error) {
if len(r.sources) == 0 {
return nil, nil
}
rsets := make([]plan, len(r.sources))
names := make([]string, len(r.sources))
var err error
......
......@@ -750,8 +750,14 @@ func (s *selectStmt) String() string {
}
b.WriteString(" " + strings.Join(a, ", "))
}
b.WriteString(" FROM ")
b.WriteString(s.from.String())
if s.from != nil {
j := s.from.String()
if strings.TrimSpace(j) != "" {
b.WriteString(" FROM ")
b.WriteString(j)
}
}
if s.where != nil {
b.WriteString(" WHERE ")
b.WriteString(s.where.expr.String())
......
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