25 #ifndef QUERYENGINE_SPECULATIVETOPN_H
26 #define QUERYENGINE_SPECULATIVETOPN_H
33 #include <unordered_map>
64 const std::vector<Analyzer::Expr*>& target_exprs,
65 const size_t truncate_n);
70 std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner,
74 const bool desc)
const;
77 std::unordered_map<int64_t, SpeculativeTopNVal>
map_;
84 : std::runtime_error(
"SpeculativeTopNFailed: " + msg)
98 void add(
const std::shared_ptr<Analyzer::Expr> expr,
const bool desc);
99 bool contains(
const std::shared_ptr<Analyzer::Expr> expr,
const bool desc)
const;
103 std::vector<std::pair<std::shared_ptr<Analyzer::Expr>,
bool>>
blacklist_;
108 #endif // QUERYENGINE_SPECULATIVETOPN_H
void reduce(SpeculativeTopNMap &that)
bool contains(const std::shared_ptr< Analyzer::Expr > expr, const bool desc) const
SpeculativeTopNFailed(const std::string &msg)
bool use_speculative_top_n(const RelAlgExecutionUnit &ra_exe_unit, const QueryMemoryDescriptor &query_mem_desc)
bool operator>(const SpeculativeTopNEntry &that) const
bool operator<(const SpeculativeTopNEntry &that) const
bool g_enable_smem_group_by true
bool failed_during_iteration_
bool failedDuringIteration() const
std::shared_ptr< ResultSet > asRows(const RelAlgExecutionUnit &ra_exe_unit, std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner, const QueryMemoryDescriptor &query_mem_desc, const Executor *executor, const size_t top_n, const bool desc) const
bool g_enable_watchdog false
std::vector< std::pair< std::shared_ptr< Analyzer::Expr >, bool > > blacklist_
void add(const std::shared_ptr< Analyzer::Expr > expr, const bool desc)
std::unordered_map< int64_t, SpeculativeTopNVal > map_