code: func (s *SelectStatement) Clone() *SelectStatement {
  	clone := *s
  	clone.Fields = make(Fields, 0, len(s.Fields))
  	clone.Dimensions = make(Dimensions, 0, len(s.Dimensions))
  	clone.Sources = cloneSources(s.Sources)
  	clone.SortFields = make(SortFields, 0, len(s.SortFields))
  	clone.Condition = CloneExpr(s.Condition)
  
  	if s.Target != nil {
  		clone.Target = &Target{
  			Measurement: &Measurement{
  				Database:        s.Target.Measurement.Database,
  				RetentionPolicy: s.Target.Measurement.RetentionPolicy,
  				Name:            s.Target.Measurement.Name,
  				Regex:           CloneRegexLiteral(s.Target.Measurement.Regex),
  			},
  		}
  	}
  	for _, f := range s.Fields {
  		clone.Fields = append(clone.Fields, &Field{Expr: CloneExpr(f.Expr), Alias: f.Alias})
  	}
  	for _, d := range s.Dimensions {
  		clone.Dimensions = append(clone.Dimensions, &Dimension{Expr: CloneExpr(d.Expr)})
  	}
  	for _, f := range s.SortFields {
  		clone.SortFields = append(clone.SortFields, &SortField{Name: f.Name, Ascending: f.Ascending})
  	}
  	return &clone
  }
docs: // Clone returns a deep copy of the statement.