Fix precendence bug in S3Select SQL IN clauses (#18708)

Fixes a precendence issue in SQL Select where `a in b and c = 3` was parsed as `a
in (b and c = 3)`.

Fixes #18682
This commit is contained in:
Aditya Manthramurthy
2023-12-22 23:19:11 -08:00
committed by GitHub
parent 8bd4f6568b
commit 496027b589
5 changed files with 57 additions and 12 deletions

View File

@@ -211,10 +211,8 @@ func (e *ConditionOperand) aggregateRow(r Record, tableAlias string) error {
}
return e.ConditionRHS.Between.End.aggregateRow(r, tableAlias)
case e.ConditionRHS.In != nil:
elt := e.ConditionRHS.In.ListExpression
err = elt.aggregateRow(r, tableAlias)
if err != nil {
return err
if e.ConditionRHS.In.ListExpr != nil {
return e.ConditionRHS.In.ListExpr.aggregateRow(r, tableAlias)
}
return nil
case e.ConditionRHS.Like != nil: