Michael Smith has posted comments on this change. ( http://gerrit.cloudera.org:8080/21484 )
Change subject: IMPALA-12800: Add null slots cache ...................................................................... Patch Set 3: (2 comments) http://gerrit.cloudera.org:8080/#/c/21484/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/21484/3//COMMIT_MSG@18 PS3, Line 18: Adds 'use_null_slots_cache' query option to disable caching. Documents : the new option. > My thinking was queries fall into 3 categories: Also, my default would be to use query options for anything that is query-specific. Can always use default_query_options to set a cluster-wide default. http://gerrit.cloudera.org:8080/#/c/21484/3/fe/src/main/java/org/apache/impala/analysis/Analyzer.java File fe/src/main/java/org/apache/impala/analysis/Analyzer.java: http://gerrit.cloudera.org:8080/#/c/21484/3/fe/src/main/java/org/apache/impala/analysis/Analyzer.java@541 PS3, Line 541: // Null slots cache - for expressions with slots replaced by nulls - to reduce : // backend expression evaluation when query contains many similar expressions. : private final Map<Expr, Boolean> isTrueWithNullSlotsCache = new HashMap<>(); : : // Track null slots cache hits. : private int isTrueWithNullSlotsCacheHits = 0; : : // Track null slots cache misses. : private int isTrueWithNullSlotsCacheMisses = 0; > Sure, I can wrap this up in a private class. I thought about mirroring http Hmm, guava Cache does cover all the features I want though. My worry is that calculating size for every entry could be expensive (seems to add ~30 ms to the test query), so not sure I want to do it for everything. So we can either default it to unlimited with an option to set a limit, or just set a default limit and eat the extra cost. -- To view, visit http://gerrit.cloudera.org:8080/21484 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib63f5553284f21f775d2097b6c5d6bbb63699acd Gerrit-Change-Number: 21484 Gerrit-PatchSet: 3 Gerrit-Owner: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Joe McDonnell <joemcdonn...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Comment-Date: Thu, 06 Jun 2024 21:24:16 +0000 Gerrit-HasComments: Yes