28 void keepTargetExprs(std::vector<std::shared_ptr<Analyzer::Expr>>& in_target_exprs) {
29 for (
const auto& expr : in_target_exprs) {
52 std::optional<ResultSetMetaInfo> meta_info = std::nullopt)
override;
62 std::optional<ResultSetMetaInfo> meta_info = std::nullopt)
override;
70 std::unordered_set<QueryPlanHash>& key_set,
74 std::string
toString()
const override;
76 std::tuple<QueryPlanHash, ResultSetPtr, std::optional<ResultSetMetaInfo>>
81 const std::unordered_set<size_t>& table_keys,
82 std::lock_guard<std::mutex>& lock);
85 size_t table_key)
const;
102 std::lock_guard<std::mutex>& lock,
103 std::optional<ResultSetMetaInfo> meta_info = std::nullopt)
const override;
109 std::lock_guard<std::mutex>& lock,
110 std::optional<ResultSetMetaInfo> meta_info = std::nullopt)
override;
115 size_t required_size,
116 std::lock_guard<std::mutex>& lock,
117 std::optional<ResultSetMetaInfo> meta_info = std::nullopt)
override;
void cleanupCacheForInsertion(CacheItemType item_type, DeviceIdentifier device_identifier, size_t required_size, std::lock_guard< std::mutex > &lock, std::optional< ResultSetMetaInfo > meta_info=std::nullopt) override
std::vector< std::shared_ptr< Analyzer::Expr > > & getTargetExprs(QueryPlanHash key) const
CacheMetricTracker & getMetricTracker(CacheItemType item_type)
std::unordered_map< size_t, std::unordered_set< size_t > > table_key_to_query_plan_dag_map_
std::optional< std::vector< TargetMetaInfo > > getOutputMetaInfo(QueryPlanHash key)
void addQueryPlanDagForTableKeys(size_t hashed_query_plan_dag, const std::unordered_set< size_t > &table_keys, std::lock_guard< std::mutex > &lock)
void clearCache() override
std::shared_ptr< ResultSet > ResultSetPtr
void initCache() override
std::optional< std::unordered_set< size_t > > getMappedQueryPlanDagsWithTableKey(size_t table_key) const
g_query_resultset_cache_total_bytes
std::tuple< QueryPlanHash, ResultSetPtr, std::optional< ResultSetMetaInfo > > getCachedResultSetWithoutCacheKey(std::set< size_t > &visited, DeviceIdentifier device_identifier)
std::string toString() const override
void putItemToCache(QueryPlanHash key, ResultSetPtr item_ptr, CacheItemType item_type, DeviceIdentifier device_identifier, size_t item_size, size_t compute_time, std::optional< ResultSetMetaInfo > meta_info=std::nullopt) override
void removeItemFromCache(QueryPlanHash key, CacheItemType item_type, DeviceIdentifier device_identifier, std::lock_guard< std::mutex > &lock, std::optional< ResultSetMetaInfo > meta_info=std::nullopt) override
CacheMetricTracker & getResultSetRecyclerMetricTracker()
bool hasItemInCache(QueryPlanHash key)
void markCachedItemAsDirty(size_t table_key, std::unordered_set< QueryPlanHash > &key_set, CacheItemType item_type, DeviceIdentifier device_identifier) override
virtual ResultSetPtr getItemFromCache(QueryPlanHash key, CacheItemType item_type, DeviceIdentifier device_identifier, std::optional< ResultSetMetaInfo > meta_info=std::nullopt)=0
Execution unit for relational algebra. It's a low-level description of any relational algebra operati...
g_max_cacheable_query_resultset_size_bytes
void removeTableKeyInfoFromQueryPlanDagMap(size_t table_key)