Split out negation behaviour into a new TextQueryBackend subclass #86
Labels
enhancement
New feature or request
refactoring
Making the codebase better by organising it appropriately
Due to the way negation works differently in Loki when compared with many other query languages (i.e., it lacks a NOT operator, only supporting individually negated conditions), a large number of changes to the default TextQueryBackend class had to be made within our backend to achieve feature parity. Currently, these changes are intertwined into our implementation of the LogQLBackend (e.g., in update_parsed_conditions, set_expression_templates, and convert_field_expression_to_line_filter).
A concern from this is that future updates to pySigma may easily lead to breaking our negation approach (hence the large number of unit tests for negated queries). If we were able to refactor this functionality into a separate TextQueryBackend subclass, it might reduce the likelihood/impact of such an occurrence, should help reduce the code complexity of the LogQLBackend, and might allow it to be moved more easily into the pySigma project for future maintenance when the library is updated.
The text was updated successfully, but these errors were encountered: