Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.3"
go-version: "1.25"

- name: Install dependencies
run: go mod download
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.3"
go-version: "1.25"

- name: Install dependencies
run: go mod download
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.3"
go-version: "1.25"

- name: Install dependencies
run: go mod download
Expand All @@ -94,7 +94,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.3"
go-version: "1.25"

- name: Install dependencies
run: go mod download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.3"
go-version: "1.25"

- name: Install dependencies
run: go mod download
Expand Down
4 changes: 0 additions & 4 deletions pkg/parser/advanced_features.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ func (p *Parser) parseCaseExpression() (*CaseExpression, error) {
return nil, fmt.Errorf("failed to parse CASE input: %v", err)
}
ce.Input = input
p.nextToken()
}

// Parse WHEN clauses
Expand All @@ -385,7 +384,6 @@ func (p *Parser) parseCaseExpression() (*CaseExpression, error) {
return nil, fmt.Errorf("failed to parse ELSE result: %v", err)
}
ce.ElseResult = elseResult
p.nextToken()
}

// Expect END keyword
Expand All @@ -412,7 +410,6 @@ func (p *Parser) parseWhenClause() (*WhenClause, error) {
return nil, fmt.Errorf("failed to parse WHEN condition: %v", err)
}
wc.Condition = condition
p.nextToken()

// Expect THEN keyword
if !p.curTokenIs(lexer.THEN) {
Expand All @@ -426,7 +423,6 @@ func (p *Parser) parseWhenClause() (*WhenClause, error) {
return nil, fmt.Errorf("failed to parse THEN result: %v", err)
}
wc.Result = result
p.nextToken()

return wc, nil
}
10 changes: 5 additions & 5 deletions pkg/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,9 @@ func (p *Parser) parseOrderByClause() ([]*OrderByClause, error) {
}

p.nextToken()
if !p.expectPeek(lexer.BY) {
return nil, fmt.Errorf("expected BY after ORDER")
if !p.curTokenIs(lexer.BY) {
return nil, fmt.Errorf("expected BY after ORDER, got %s", p.curToken.Literal)
}

p.nextToken()

var clauses []*OrderByClause
Expand Down Expand Up @@ -822,9 +821,10 @@ func (p *Parser) parseGroupedExpression() (Expression, error) {
return nil, err
}

if !p.expectPeek(lexer.RPAREN) {
return nil, fmt.Errorf("expected ')' to close grouped expression")
if !p.curTokenIs(lexer.RPAREN) {
return nil, fmt.Errorf("expected ')' to close grouped expression, got %s", p.curToken.Literal)
}
p.nextToken()

return exp, nil
}
Expand Down
2 changes: 1 addition & 1 deletion tests/dialect_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func BenchmarkComplexDialectQueries(b *testing.B) {
"INNER JOIN `ecommerce`.`orders` `o` ON `u`.`user_id` = `o`.`user_id` " +
"INNER JOIN `ecommerce`.`order_items` `oi` ON `o`.`order_id` = `oi`.`order_id` " +
"INNER JOIN `ecommerce`.`products` `p` ON `oi`.`product_id` = `p`.`product_id` " +
"WHERE `o`.`order_date` >= DATE_SUB(NOW(), INTERVAL 30 DAY) " +
"WHERE `o`.`order_date` >= '2024-01-01' " +
"AND `u`.`status` = 'active' " +
"AND `p`.`category` IN ('electronics', 'books', 'clothing') " +
"GROUP BY `u`.`user_id`, `u`.`username`, `p`.`name`, `oi`.`quantity`, `oi`.`price`, `o`.`order_date`, `o`.`status`, `o`.`total_amount` " +
Expand Down