diff --git a/src/stream_processor/parser/sql.y b/src/stream_processor/parser/sql.y index 866f95cc023..e798cdf021a 100644 --- a/src/stream_processor/parser/sql.y +++ b/src/stream_processor/parser/sql.y @@ -1,5 +1,4 @@ -%name-prefix="flb_sp_" // replace with %define api.prefix {flb_sp_} -%define api.pure full +%name-prefix "flb_sp_" // replace with %define api.prefix {flb_sp_} %define parse.error verbose %parse-param { struct flb_sp_cmd *cmd }; %parse-param { const char *query }; @@ -98,6 +97,10 @@ void yyerror(struct flb_sp_cmd *cmd, const char *query, void *scanner, const cha %type aggregate_func %type COUNT AVG SUM MAX MIN TIMESERIES_FORECAST +/* Define operator precedence and associativity for logical operations in conditions */ +%right NOT // Highest precedence for NOT +%left OR // Lowest precedence for OR +%left AND // Middle precedence for AND %destructor { flb_free ($$); } IDENTIFIER