Skip to content

Commit

Permalink
Disallow aggregate/window mixing with MATCH expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydrocharged committed Aug 22, 2023
1 parent 26116f8 commit 7e88fc4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/planbuilder/scalar.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,10 @@ func (b *Builder) ConvertVal(v *ast.SQLVal) sql.Expression {
// filter, since we only need to load the tables once. All steps after this
// one can assume that the expression has been fully resolved and is valid.
func (b *Builder) buildMatchAgainst(inScope *scope, v *ast.MatchExpr) *expression.MatchAgainst {
//TODO: implement proper scope support and remove this check
if (inScope.groupBy != nil && inScope.groupBy.hasAggs()) || inScope.windowFuncs != nil {
b.handleErr(fmt.Errorf("aggregate and window functions are not yet supported alongside MATCH expressions"))
}
rts := getTablesByName(inScope.node)
var rt *plan.ResolvedTable
var matchTable string
Expand Down

0 comments on commit 7e88fc4

Please sign in to comment.