remove cruft

pull/2568/head
Cory LaNou 2015-05-18 16:33:54 -06:00
parent 580def2ff6
commit 2b7701678c
1 changed files with 0 additions and 13 deletions

View File

@ -967,20 +967,7 @@ func (s *SelectStatement) ValidateDistinct() error {
if !s.HasDistinct() {
return nil
}
// determine if we have a call named distinct
for _, f := range s.Fields {
switch c := f.Expr.(type) {
case *Call:
if c.Name == "distinct" {
goto hasDistinct
}
case *Distinct:
goto hasDistinct
}
}
return nil
hasDistinct:
if len(s.Fields) > 1 {
return fmt.Errorf("aggregate function distinct() can not be combined with other functions or fields")
}