Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[opt](cache) enhance cache key computation by removing comments and t…
…rimming SQL input (#46099) - Currently, the SQL cache system in Doris may miss cache hits due to semantically identical queries being treated as different because of: - Extra whitespace characters in the SQL query - SQL comments that don't affect the query execution - For example, these queries are semantically identical but would generate different cache keys: ```sql SELECT * FROM table; -- Same query with comments and extra spaces /* Comment */ SELECT * FROM table ; ``` - This PR improves the SQL cache hit rate by: - Trimming whitespace from SQL queries - Removing SQL comments before calculating the cache key MD5 - This ensures that queries that are semantically identical but differ only in whitespace or comments will now hit the same cache entry, improving cache efficiency and reducing unnecessary query executions
- Loading branch information