MeihanLi opened a new pull request, #17177: URL: https://github.com/apache/pinot/pull/17177
### Add SqlNode-based Query Fingerprinting for Multi-Stage Query Engine **Summary** This PR introduces a robust SqlNode-based query fingerprinting mechanism that works for both single-stage and multi-stage query engines. Query fingerprinting creates canonical representations of SQL queries by replacing literals with dynamic parameters, enabling query pattern analysis, caching, and monitoring. **Issues to Solve** https://github.com/apache/pinot/issues/16765 **Details:** Parses queries using Calcite's SqlNode AST - Works with the same parser used by the multi-stage engine Normalizes queries via visitor pattern - Traverses the AST and replaces all literals with dynamic parameters (?) Supports all SQL constructs - Handles table aliases, JOINs, CTEs, subqueries, set operations, window functions, and more Produces consistent fingerprints - Normalizes whitespace and uses ANSI SQL standard syntax **Release Notes** `feature` `observability` By default, query fingerprinting is disabled. This is a non-breaking change that requires opt-in configuration to enable the feature in production environments. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
