Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Operator Precedence for Logical Operations in Stream Processor #9388

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

unitmatrix
Copy link

Fixes #3763

Summary

This pull request addresses the issue where the precedence of logical operators (AND, OR, NOT) was not defined in the grammar for the stream processor.

Changes Made

  • Added precedence rules for NOT, AND, and OR operators to the Bison grammar file.
    • NOT now has the highest precedence.
    • AND has middle precedence.
    • OR has the lowest precedence.

Issue Addressed

Fixes GitHub issue: stream_processor: precedence of AND, OR, and NOT not defined in grammar.

Impact

This change ensures that logical operations in conditions are parsed with the correct precedence, aligning with expected logical operation rules.

Testing

Please verify that the logical operations in conditions are handled correctly according to the new precedence rules.

Feel free to reach out if there are any questions or further adjustments needed.

Signed-off-by: Aleksandr Cupacenko <apaxuc@gmail.com>

revert definition removal

Signed-off-by: Aleksandr Cupacenko <apaxuc@gmail.com>
correct precedencer order
@koleini
Copy link
Collaborator

koleini commented Sep 17, 2024

Thanks @unitmatrix, it would be great if the syntax (https://github.com/fluent/fluent-bit/tree/master/src/stream_processor#sql-statement-syntax) can be updated based on your changes as well.

@unitmatrix
Copy link
Author

Hi @koleini,

Thank you for your feedback. To ensure that I address your request accurately, I revisited my changes and believe they do not impact the existing SQL statement syntax as outlined in the documentation. Could you please specify which part of the syntax might be affected, or if there are specific updates you have in mind? This will help me make the necessary adjustments to the documentation more effectively.

Looking forward to your guidance.
Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stream_processor: precedence of AND, OR, and NOT not defined in grammar
2 participants