You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/13 14:49:50 UTC

[GitHub] [arrow] siddhantrao23 commented on a diff in pull request #13446: ARROW-16917: [C++][Gandiva] Add a Secondary Cache to cache gandiva object code

siddhantrao23 commented on code in PR #13446:
URL: https://github.com/apache/arrow/pull/13446#discussion_r920174811


##########
cpp/src/gandiva/projector.cc:
##########
@@ -75,6 +92,17 @@ Status Projector::Make(SchemaPtr schema, const ExpressionVector& exprs,
   // Verify if previous projector obj code was cached
   if (prev_cached_obj != nullptr) {
     is_cached = true;
+  } else if (sec_cache != nullptr) {
+    std::shared_ptr<arrow::Buffer> arrow_buffer = sec_cache->Get(cache_key.Hash());

Review Comment:
   Added `Engine.Hash()` which includes the cpu attributes and name to the key



##########
cpp/src/gandiva/filter.cc:
##########
@@ -37,8 +37,15 @@ Filter::Filter(std::unique_ptr<LLVMGenerator> llvm_generator, SchemaPtr schema,
 
 Filter::~Filter() {}
 
+Status Filter::Make(SchemaPtr schema, ConditionPtr condition,
+                    std::shared_ptr<Configuration> config,
+                    std::shared_ptr<Filter>* filter) {
+  return Make(schema, condition, config, nullptr, filter);
+}
+
 Status Filter::Make(SchemaPtr schema, ConditionPtr condition,
                     std::shared_ptr<Configuration> configuration,
+                    std::shared_ptr<SecondaryCacheInterface> sec_cache,

Review Comment:
   Added the calls to secondary cache in filter as well



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org