Optimize add row in aggregate
This commit is contained in:
@ -34,7 +34,7 @@ public:
|
||||
public:
|
||||
ApproxCountDistinct() {}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -89,7 +89,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -407,7 +407,7 @@ public:
|
||||
}
|
||||
TO_STRING_KV("aggregate", "approx_count_distinct", K(in_tc), K(out_tc), K(agg_func));
|
||||
private:
|
||||
int llc_add_value(const uint64_t value, char *llc_bitmap_buf, int64_t size)
|
||||
OB_INLINE int llc_add_value(const uint64_t value, char *llc_bitmap_buf, int64_t size)
|
||||
{
|
||||
// copy from `ObAggregateProcessor::llv_add_value`
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSEDx(agg_ctx, columns, row_num, tmp_res, calc_info, agg_col_id);
|
||||
@ -129,7 +129,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
@ -142,7 +142,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -174,7 +174,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSEDx(agg_ctx, columns, row_num, agg_col_id, agg_cell, tmp_res, calc_info);
|
||||
@ -183,7 +183,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
|
@ -810,7 +810,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *aggr_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSEDx(agg_ctx, columns, row_num, agg_col_id, aggr_cell, tmp_res, calc_info);
|
||||
@ -818,7 +818,7 @@ public:
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSED(tmp_res);
|
||||
@ -199,7 +199,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -288,7 +288,7 @@ public:
|
||||
TO_STRING_KV("aggregate", (is_min ? "min" : "max"), K(vec_tc));
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
return ret;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSEDx(agg_cell, tmp_res, calc_info);
|
||||
@ -140,7 +140,7 @@ public:
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
SumAggregate() {}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSED(tmp_res);
|
||||
@ -88,7 +88,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename ColumnFmt>
|
||||
int sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -106,7 +106,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -123,7 +123,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -379,7 +379,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res_ptr, int64_t &calc_info)
|
||||
{
|
||||
OB_ASSERT(tmp_res_ptr != NULL);
|
||||
@ -425,7 +425,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int64_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res_ptr,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
@ -444,7 +444,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename ColumnFmt>
|
||||
int sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -498,7 +498,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -187,7 +187,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *aggr_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
UNUSEDx(agg_ctx, columns, row_num, agg_col_id, aggr_cell, tmp_res, calc_info);
|
||||
@ -196,7 +196,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res,
|
||||
int64_t &calc_info)
|
||||
{
|
||||
@ -227,7 +227,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_or_sub_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
SysBitAggregate() {}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
@ -52,7 +52,7 @@ public:
|
||||
}
|
||||
|
||||
template <typename ColumnFmt>
|
||||
inline int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
OB_INLINE int add_nullable_row(RuntimeContext &agg_ctx, ColumnFmt &columns, const int32_t row_num,
|
||||
const int32_t agg_col_id, char *agg_cell, void *tmp_res, int64_t &calc_info)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
|
Reference in New Issue
Block a user