[ https://issues.apache.org/jira/browse/HIVE-22962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053800#comment-17053800 ]
Jesus Camacho Rodriguez commented on HIVE-22962: ------------------------------------------------ [~gopalv], [~rajesh.balamohan], [~vgarg], could you take a look? Thanks https://github.com/apache/hive/pull/943 Preliminary results are quite promising (posted above). I also implemented the warm up for the cache when HS2 comes up. The reason why I kept {{RelFieldTrimmer}} around instead of merging {{RelFieldTrimmer}} and {{HiveRelFieldTrimmer}} is that I do not know when I will be able to merge these changes into Calcite, hence it will make easier to bring new version of field trimmer whenever Calcite is upgraded (basically {{RelFieldTrimmer}} is almost unchanged wrt Calcite version). > Reuse HiveRelFieldTrimmer instance across queries > ------------------------------------------------- > > Key: HIVE-22962 > URL: https://issues.apache.org/jira/browse/HIVE-22962 > Project: Hive > Issue Type: Improvement > Components: CBO > Reporter: Jesus Camacho Rodriguez > Assignee: Jesus Camacho Rodriguez > Priority: Major > Labels: pull-request-available > Attachments: HIVE-22962.01.patch, HIVE-22962.02.patch, > HIVE-22962.03.patch, HIVE-22962.04.patch, HIVE-22962.05.patch, > HIVE-22962.06.patch, HIVE-22962.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Currently we create multiple {{HiveRelFieldTrimmer}} instances per query. > {{HiveRelFieldTrimmer}} uses a method dispatcher that has a built-in caching > mechanism: given a certain object, it stores the method that was called for > the object class. However, by instantiating the trimmer multiple times per > query and across queries, we create a new dispatcher with each instantiation, > thus effectively removing the caching mechanism that is built within the > dispatcher. > This issue is to reutilize the same {{HiveRelFieldTrimmer}} instance within a > single query and across queries. -- This message was sent by Atlassian Jira (v8.3.4#803005)