17 #include "../SystemFunctions/os/Shared/TableFunctionsCommon.hpp"
38 return input_min_max.first;
40 return input_min_max.second;
50 return input1_min_max.first < input2_min_max.first ? input1_min_max.first
51 : input2_min_max.first;
53 return input1_min_max.second > input2_min_max.second ? input1_min_max.second
54 : input2_min_max.second;
59 template <
typename K,
typename T,
typename Z>
72 const std::string agg_type_str = agg_type.
getString();
75 output_row_count[0] = input_id.
size();
83 template <
typename K,
typename T,
typename Z>
93 const int64_t input_size = input_id.
size();
95 for (int64_t input_idx = 0; input_idx < input_size; ++input_idx) {
96 output_id[input_idx] = input_id[input_idx];
97 output_x[input_idx] = input_x[input_idx];
98 output_y[input_idx] = input_y[input_idx];
99 output_z[input_idx] = input_z[input_idx];
104 template <
typename K,
typename T,
typename Z>
124 const std::string agg_type_str = agg_type.
getString();
126 output_row_count[0] = input1_id.
size() + input2_id.
size();
131 if (input2_w.
size() > 0) {
133 output_w[0] = agg_type_str ==
"MIN" ? w_min_max.first : w_min_max.second;
140 template <
typename K,
typename T,
typename Z>
157 const int64_t input1_size = input1_id.
size();
158 const int64_t input2_size = input2_id.
size();
159 int64_t output_size = input1_size + input2_size;
161 for (int64_t input1_idx = 0; input1_idx < input1_size; ++input1_idx) {
162 output_id[input1_idx] = input1_id[input1_idx];
163 output_x[input1_idx] = input1_x[input1_idx];
164 output_y[input1_idx] = input1_y[input1_idx];
165 output_z[input1_idx] = input1_z[input1_idx];
168 for (int64_t input2_idx = 0; input2_idx < input2_size; ++input2_idx) {
169 output_id[input1_size + input2_idx] = input2_id[input2_idx];
170 output_x[input1_size + input2_idx] = input2_x[input2_idx];
171 output_y[input1_size + input2_idx] = input2_y[input2_idx];
172 output_z[input1_size + input2_idx] = input2_z[input2_idx];
173 output_w[input1_size + input2_idx] = input2_w[input2_idx];
NEVER_INLINE HOST int32_t ct_pushdown_projection__cpu_template(TableFunctionManager &mgr, const Column< K > &input_id, const Column< T > &input_x, const Column< T > &input_y, const Column< Z > &input_z, Column< K > &output_id, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z)
void set_output_row_size(int64_t num_rows)
std::string getString() const
NEVER_INLINE HOST std::pair< T, T > get_column_min_max(const Column< T > &col)
DEVICE int64_t size() const
NEVER_INLINE HOST int32_t ct_pushdown_stats__cpu_template(TableFunctionManager &mgr, const TextEncodingNone &agg_type, const Column< K > &input_id, const Column< T > &input_x, const Column< T > &input_y, const Column< Z > &input_z, Column< int32_t > &output_row_count, Column< K > &output_id, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z)
TEMPLATE_INLINE T get_min_or_max(const Column< T > &col, const TFAggType min_or_max)
NEVER_INLINE HOST int32_t ct_union_pushdown_projection__cpu_template(TableFunctionManager &mgr, const Column< K > &input1_id, const Column< T > &input1_x, const Column< T > &input1_y, const Column< Z > &input1_z, const Column< K > &input2_id, const Column< T > &input2_x, const Column< T > &input2_y, const Column< Z > &input2_z, const Column< T > &input2_w, Column< K > &output_id, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z, Column< T > &output_w)
NEVER_INLINE HOST int32_t ct_union_pushdown_stats__cpu_template(TableFunctionManager &mgr, const TextEncodingNone &agg_type, const Column< K > &input1_id, const Column< T > &input1_x, const Column< T > &input1_y, const Column< Z > &input1_z, const Column< K > &input2_id, const Column< T > &input2_x, const Column< T > &input2_y, const Column< Z > &input2_z, const Column< T > &input2_w, Column< int32_t > &output_row_count, Column< K > &output_id, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z, Column< T > &output_w)
TEMPLATE_INLINE T get_min_or_max_union(const Column< T > &col1, const Column< T > &col2, const TFAggType min_or_max)
DEVICE void setNull(int64_t index)