Skip to content

Commit f849263

Browse files
authored
Add comprehensive parser test cases from ClickHouse official repository (#3)
1 parent ec361e6 commit f849263

File tree

585 files changed

+650
-494
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

585 files changed

+650
-494
lines changed

go.sum

Whitespace-only changes.

parser/expression.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package parser
22

33
import (
4+
"fmt"
45
"strconv"
56
"strings"
67

@@ -163,7 +164,11 @@ func (p *Parser) parseInfixExpression(left ast.Expression) ast.Expression {
163164
if ident, ok := left.(*ast.Identifier); ok {
164165
return p.parseFunctionCall(ident.Name(), ident.Position)
165166
}
166-
return left
167+
// Parametric function call like quantile(0.9)(number) - not yet supported
168+
// Return nil to signal error and prevent infinite loop
169+
p.errors = append(p.errors, fmt.Errorf("parametric function calls like func(params)(args) are not yet supported at line %d, column %d",
170+
p.current.Pos.Line, p.current.Pos.Column))
171+
return nil
167172
case token.LBRACKET:
168173
return p.parseArrayAccess(left)
169174
case token.DOT:

0 commit comments

Comments
 (0)