Skip to content

Commit

Permalink
fix(chsql): do not wrap where/prewhere expression
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jun 21, 2024
1 parent e2d7301 commit b11d586
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/chstorage/chsql/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,9 @@ func (q *SelectQuery) WriteSQL(p *Printer) error {
if i != 0 {
p.And()
}
p.OpenParen()
if err := p.WriteExpr(filter); err != nil {
return errors.Wrapf(err, "prewhere %d", i)
}
p.CloseParen()
}
}
if len(q.where) > 0 {
Expand All @@ -172,11 +170,9 @@ func (q *SelectQuery) WriteSQL(p *Printer) error {
if i != 0 {
p.And()
}
p.OpenParen()
if err := p.WriteExpr(filter); err != nil {
return errors.Wrapf(err, "where %d", i)
}
p.CloseParen()
}
}
if len(q.order) > 0 {
Expand Down

0 comments on commit b11d586

Please sign in to comment.