OmniSciDB
a5dc49c757
|
#include <iostream>
#include <stdexcept>
#include <string>
#include <vector>
#include <rapidjson/document.h>
#include "QueryEngine/heavydbTypes.h"
Go to the source code of this file.
Classes | |
struct | StatsRequestPredicate |
struct | ColumnStats< T > |
struct | StatsRequest |
Functions | |
std::vector< StatsRequest > | parse_stats_requests_json (const std::string &stats_requests_json_str, const int64_t num_attrs) |
template<typename TA > | |
ColumnStats< TA > | get_column_stats (const ColumnList< TA > &attrs, StatsRequest &stats_request, std::unordered_map< std::string, ColumnStats< TA >> &stats_map) |
template<typename TA > | |
void | compute_stats_requests (const ColumnList< TA > &attrs, std::vector< StatsRequest > &stats_requests) |
template<typename TA > | |
void | populate_output_stats_cols (Column< TextEncodingDict > &stat_names, Column< TA > &stat_vals, const std::vector< StatsRequest > &stats_requests) |
template<typename T > | |
NEVER_INLINE HOST ColumnStats< T > | get_column_stats (const T *data, const int64_t num_rows, const StatsRequestPredicate &predicate=StatsRequestPredicate()) |
template<typename T > | |
NEVER_INLINE HOST ColumnStats< T > | get_column_stats (const Column< T > &col, const StatsRequestPredicate &predicate=StatsRequestPredicate()) |
|
strong |
Enumerator | |
---|---|
COUNT | |
MIN | |
MAX | |
SUM | |
AVG |
Definition at line 104 of file TableFunctionsStats.hpp.
|
strong |
Enumerator | |
---|---|
NONE | |
LT | |
GT |
Definition at line 30 of file TableFunctionsStats.hpp.
void compute_stats_requests | ( | const ColumnList< TA > & | attrs, |
std::vector< StatsRequest > & | stats_requests | ||
) |
Definition at line 143 of file TableFunctionsStats.hpp.
References AVG, COUNT, get_column_stats(), MAX, MIN, and SUM.
ColumnStats<TA> get_column_stats | ( | const ColumnList< TA > & | attrs, |
StatsRequest & | stats_request, | ||
std::unordered_map< std::string, ColumnStats< TA >> & | stats_map | ||
) |
Definition at line 126 of file TableFunctionsStats.hpp.
References StatsRequest::attr_id, StatsRequest::filter_type, StatsRequest::filter_val, get_column_stats(), StatsRequestPredicate::to_string(), and to_string().
NEVER_INLINE HOST ColumnStats<T> get_column_stats | ( | const T * | data, |
const int64_t | num_rows, | ||
const StatsRequestPredicate & | predicate = StatsRequestPredicate() |
||
) |
Definition at line 22 of file TableFunctionsStats.cpp.
References ColumnStats< T >::max, max_inputs_per_thread, ColumnStats< T >::mean, ColumnStats< T >::min, ColumnStats< T >::non_null_or_filtered_count, threading_serial::parallel_for(), ColumnStats< T >::sum, heavydb.dtypes::T, and ColumnStats< T >::total_count.
Referenced by compute_stats_requests(), and get_column_stats().
NEVER_INLINE HOST ColumnStats<T> get_column_stats | ( | const Column< T > & | col, |
const StatsRequestPredicate & | predicate = StatsRequestPredicate() |
||
) |
Definition at line 133 of file TableFunctionsStats.cpp.
References get_column_stats(), Column< T >::getPtr(), and Column< T >::size().
std::vector<StatsRequest> parse_stats_requests_json | ( | const std::string & | stats_requests_json_str, |
const int64_t | num_attrs | ||
) |
Definition at line 211 of file TableFunctionsStats.cpp.
References StatsRequest::agg_type, StatsRequest::attr_id, convert_string_to_stats_request_agg_type(), convert_string_to_stats_request_predicate_op(), StatsRequest::filter_type, StatsRequest::filter_val, StatsRequest::name, NONE, replace_substrings(), to_string(), and shared::transform().
void populate_output_stats_cols | ( | Column< TextEncodingDict > & | stat_names, |
Column< TA > & | stat_vals, | ||
const std::vector< StatsRequest > & | stats_requests | ||
) |
Definition at line 175 of file TableFunctionsStats.hpp.
References StringDictionaryProxy::getOrAddTransient(), setup::name, logger::request_id(), and Column< TextEncodingDict >::string_dict_proxy_.