@@ -30,8 +30,8 @@ type ExpressionVisitor interface {
30
30
OnIntegerLiteral (value int64 ) error
31
31
OnBooleanLiteral (value bool ) error
32
32
33
- OnEnterFunctionInvocation (name string ) error
34
- OnExitFunctionInvocation (name string ) error
33
+ OnEnterFunctionInvocation (name string , distinct bool ) error
34
+ OnExitFunctionInvocation (name string , distinct bool ) error
35
35
36
36
OnEnterParenthesizedExpression () error
37
37
OnExitParenthesizedExpression () error
@@ -123,7 +123,8 @@ func (ep *ExpressionParser) ParsePropertyOrLabelsExpression(q *query.QueryProper
123
123
}
124
124
} else if q .Atom .FunctionInvocation != nil {
125
125
fnName := strings .ToUpper (q .Atom .FunctionInvocation .FunctionName )
126
- err := ep .visitor .OnEnterFunctionInvocation (fnName )
126
+ distinct := q .Atom .FunctionInvocation .Distinct
127
+ err := ep .visitor .OnEnterFunctionInvocation (fnName , distinct )
127
128
if err != nil {
128
129
return err
129
130
}
@@ -134,7 +135,7 @@ func (ep *ExpressionParser) ParsePropertyOrLabelsExpression(q *query.QueryProper
134
135
return err
135
136
}
136
137
}
137
- err = ep .visitor .OnExitFunctionInvocation (fnName )
138
+ err = ep .visitor .OnExitFunctionInvocation (fnName , distinct )
138
139
if err != nil {
139
140
return err
140
141
}
@@ -425,17 +426,21 @@ func (evb *ExpressionVisitorBase) OnStringLiteral(value string) error
425
426
func (evb * ExpressionVisitorBase ) OnDoubleLiteral (value float64 ) error { return nil }
426
427
func (evb * ExpressionVisitorBase ) OnIntegerLiteral (value int64 ) error { return nil }
427
428
func (evb * ExpressionVisitorBase ) OnBooleanLiteral (value bool ) error { return nil }
428
- func (evb * ExpressionVisitorBase ) OnEnterFunctionInvocation (name string ) error { return nil }
429
- func (evb * ExpressionVisitorBase ) OnExitFunctionInvocation (name string ) error { return nil }
430
- func (evb * ExpressionVisitorBase ) OnEnterParenthesizedExpression () error { return nil }
431
- func (evb * ExpressionVisitorBase ) OnExitParenthesizedExpression () error { return nil }
432
- func (evb * ExpressionVisitorBase ) OnStringOperator (operator query.StringOperator ) error { return nil }
433
- func (evb * ExpressionVisitorBase ) OnEnterUnaryExpression () error { return nil }
434
- func (evb * ExpressionVisitorBase ) OnExitUnaryExpression () error { return nil }
435
- func (evb * ExpressionVisitorBase ) OnEnterPowerOfExpression () error { return nil }
436
- func (evb * ExpressionVisitorBase ) OnExitPowerOfExpression () error { return nil }
437
- func (evb * ExpressionVisitorBase ) OnEnterMultipleDivideModuloExpression () error { return nil }
438
- func (evb * ExpressionVisitorBase ) OnExitMultipleDivideModuloExpression () error { return nil }
429
+ func (evb * ExpressionVisitorBase ) OnEnterFunctionInvocation (name string , distinct bool ) error {
430
+ return nil
431
+ }
432
+ func (evb * ExpressionVisitorBase ) OnExitFunctionInvocation (name string , distinct bool ) error {
433
+ return nil
434
+ }
435
+ func (evb * ExpressionVisitorBase ) OnEnterParenthesizedExpression () error { return nil }
436
+ func (evb * ExpressionVisitorBase ) OnExitParenthesizedExpression () error { return nil }
437
+ func (evb * ExpressionVisitorBase ) OnStringOperator (operator query.StringOperator ) error { return nil }
438
+ func (evb * ExpressionVisitorBase ) OnEnterUnaryExpression () error { return nil }
439
+ func (evb * ExpressionVisitorBase ) OnExitUnaryExpression () error { return nil }
440
+ func (evb * ExpressionVisitorBase ) OnEnterPowerOfExpression () error { return nil }
441
+ func (evb * ExpressionVisitorBase ) OnExitPowerOfExpression () error { return nil }
442
+ func (evb * ExpressionVisitorBase ) OnEnterMultipleDivideModuloExpression () error { return nil }
443
+ func (evb * ExpressionVisitorBase ) OnExitMultipleDivideModuloExpression () error { return nil }
439
444
func (evb * ExpressionVisitorBase ) OnMultiplyDivideModuloOperator (operator query.MultiplyDivideModuloOperator ) error {
440
445
return nil
441
446
}
0 commit comments