From a3ce9a41f6aad387a9ed794bf8fbfb1e8b84a42b Mon Sep 17 00:00:00 2001 From: Zach Musgrave Date: Mon, 12 May 2025 16:26:08 -0700 Subject: [PATCH] Bug fix for offset without limit --- sql/planbuilder/select.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/planbuilder/select.go b/sql/planbuilder/select.go index 6b6e67f7cc..23340a002d 100644 --- a/sql/planbuilder/select.go +++ b/sql/planbuilder/select.go @@ -127,7 +127,7 @@ func (b *Builder) buildSelect(inScope *scope, s *ast.Select) (outScope *scope) { } func (b *Builder) buildLimit(inScope *scope, limit *ast.Limit) sql.Expression { - if limit != nil { + if limit != nil && limit.Rowcount != nil { return b.buildLimitVal(inScope, limit.Rowcount) } return nil