39 : target_expr(target_expr)
40 , target_info(target_info)
41 , base_slot_index(base_slot_index)
42 , target_idx(target_idx)
43 , is_group_by(is_group_by) {}
50 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
51 const std::vector<llvm::Value*>& agg_out_vec,
52 llvm::Value* output_buffer_byte_stream,
53 llvm::Value* out_row_idx,
54 llvm::Value* varlen_output_buffer,
62 const std::vector<llvm::Value*>& target_lvs,
63 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
64 const std::vector<llvm::Value*>& agg_out_vec,
65 llvm::Value* output_buffer_byte_stream,
66 llvm::Value* out_row_idx,
67 llvm::Value* varlen_output_buffer,
68 int32_t slot_index)
const;
70 friend std::ostream&
operator<<(std::ostream& os,
83 : ra_exe_unit(ra_exe_unit), is_group_by(is_group_by) {}
86 const Executor* executor,
95 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
96 const std::vector<llvm::Value*>& agg_out_vec,
97 llvm::Value* output_buffer_byte_stream,
98 llvm::Value* out_row_idx,
99 llvm::Value* varlen_output_buffer,
107 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
108 const std::vector<llvm::Value*>& agg_out_vec,
109 llvm::Value* output_buffer_byte_stream,
110 llvm::Value* out_row_idx,
118 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
119 const std::vector<llvm::Value*>& agg_out_vec,
120 llvm::Value* output_buffer_byte_stream,
121 llvm::Value* out_row_idx,
129 const std::tuple<llvm::Value*, llvm::Value*>& agg_out_ptr_w_idx,
130 const std::vector<llvm::Value*>& agg_out_vec,
131 llvm::Value* output_buffer_byte_stream,
132 llvm::Value* out_row_idx,
136 std::vector<llvm::Value*>& target_lvs,
139 const int64_t init_val)
const;
Defines data structures for the semantic analysis phase of query processing.
const RelAlgExecutionUnit & ra_exe_unit
void codegen(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const GpuSharedMemoryContext &gpu_smem_context, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, llvm::Value *varlen_output_buffer, DiamondCodegen &diamond_codegen, DiamondCodegen *sample_cfg=nullptr) const
void codegenMultiSlotSampleExpressions(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const
std::vector< TargetExprCodegen > target_exprs_to_codegen
friend std::ostream & operator<<(std::ostream &os, const TargetExprCodegen &target_expr_codegen)
size_t target_index_counter
size_t slot_index_counter
void operator()(const Analyzer::Expr *target_expr, const Executor *executor, QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co)
void codegenSampleExpressions(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const
std::vector< TargetExprCodegen > sample_exprs_to_codegen
void codegen(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const GpuSharedMemoryContext &gpu_smem_context, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, llvm::Value *varlen_output_buffer, DiamondCodegen &diamond_codegen) const
TargetExprCodegenBuilder(const RelAlgExecutionUnit &ra_exe_unit, const bool is_group_by)
llvm::Value * codegenSlotEmptyKey(llvm::Value *agg_col_ptr, std::vector< llvm::Value * > &target_lvs, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const int64_t init_val) const
const Analyzer::Expr * target_expr
Descriptor for the result set buffer layout.
TargetExprCodegen(const Analyzer::Expr *target_expr, TargetInfo &target_info, const int32_t base_slot_index, const size_t target_idx, const bool is_group_by)
void codegenAggregate(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::vector< llvm::Value * > &target_lvs, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, llvm::Value *varlen_output_buffer, int32_t slot_index) const
void codegenSingleSlotSampleExpression(GroupByAndAggregate *group_by_and_agg, Executor *executor, const QueryMemoryDescriptor &query_mem_desc, const CompilationOptions &co, const std::tuple< llvm::Value *, llvm::Value * > &agg_out_ptr_w_idx, const std::vector< llvm::Value * > &agg_out_vec, llvm::Value *output_buffer_byte_stream, llvm::Value *out_row_idx, DiamondCodegen &diamond_codegen) const