MCPcopy Create free account
hub / github.com/apache/arrow / ExpressionCacheKey

Method ExpressionCacheKey

cpp/src/gandiva/expression_cache_key.h:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33class ExpressionCacheKey {
34 public:
35 ExpressionCacheKey(SchemaPtr schema, std::shared_ptr<Configuration> configuration,
36 ExpressionVector expression_vector, SelectionVector::Mode mode)
37 : schema_(schema), mode_(mode), uniquifier_(0), configuration_(configuration) {
38 static const int kSeedValue = 4;
39 size_t result = kSeedValue;
40 for (auto& expr : expression_vector) {
41 std::string expr_as_string = expr->ToString();
42 expressions_as_strings_.push_back(expr_as_string);
43 arrow::internal::hash_combine(result, expr_as_string);
44 UpdateUniquifier(expr_as_string);
45 }
46 arrow::internal::hash_combine(result, static_cast<size_t>(mode));
47 arrow::internal::hash_combine(result, configuration->Hash());
48 arrow::internal::hash_combine(result, schema_->ToString());
49 arrow::internal::hash_combine(result, uniquifier_);
50 hash_code_ = result;
51 }
52
53 ExpressionCacheKey(SchemaPtr schema, std::shared_ptr<Configuration> configuration,
54 Expression& expression)

Callers

nothing calls this directly

Calls 4

hash_combineFunction · 0.85
push_backMethod · 0.80
ToStringMethod · 0.45
HashMethod · 0.45

Tested by

no test coverage detected