Refactor query analyzers to support deferred parsing
What does this MR do and why?
Query analyzers parse and normalize SQL if any analyzers are enabled, even if they do not use the parsed or normalized versions of the SQL.
This refactors QueryAnalyzer
to use a Parsed
class instead of a struct, which defers parse and normalize until those methods are called by an analyzer.
This should allow us to enable lightweight analyzers like LogLargeInLists
for more queries.
This also changes LogLargeInLists
to use raw
and a more specific regex.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Matt Kasa