23 #ifndef QUERYENGINE_SPECULATIVETOPN_H
24 #define QUERYENGINE_SPECULATIVETOPN_H
31 #include <unordered_map>
62 const std::vector<Analyzer::Expr*>& target_exprs,
63 const size_t truncate_n);
68 std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner,
72 const bool desc)
const;
75 std::unordered_map<int64_t, SpeculativeTopNVal>
map_;
82 : std::runtime_error(
"SpeculativeTopNFailed: " + msg)
96 void add(
const std::shared_ptr<Analyzer::Expr> expr,
const bool desc);
97 bool contains(
const std::shared_ptr<Analyzer::Expr> expr,
const bool desc)
const;
101 std::vector<std::pair<std::shared_ptr<Analyzer::Expr>,
bool>>
blacklist_;
106 #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_