OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fragmenter_Namespace::anonymous_namespace{UpdelStorage.cpp} Namespace Reference

Functions

void update_metadata (SQLTypeInfo const &ti, ChunkUpdateStats &update_stats, int64_t const updated_val, int64_t const old_val, NullSentinelSupplier s=NullSentinelSupplier())
 
void update_metadata (SQLTypeInfo const &ti, ChunkUpdateStats &update_stats, double const updated_val, double const old_val, NullSentinelSupplier s=NullSentinelSupplier())
 
void update_metadata (UpdateValuesStats &agg_stats, const UpdateValuesStats &new_stats)
 

Function Documentation

void Fragmenter_Namespace::anonymous_namespace{UpdelStorage.cpp}::update_metadata ( SQLTypeInfo const &  ti,
ChunkUpdateStats &  update_stats,
int64_t const  updated_val,
int64_t const  old_val,
NullSentinelSupplier  s = NullSentinelSupplier() 
)
inline

Definition at line 577 of file UpdelStorage.cpp.

References SQLTypeInfo::get_notnull(), Fragmenter_Namespace::UpdateValuesStats::has_null, Fragmenter_Namespace::UpdateValuesStats::max_int64t, Fragmenter_Namespace::UpdateValuesStats::min_int64t, Fragmenter_Namespace::ChunkUpdateStats::new_values_stats, Fragmenter_Namespace::ChunkUpdateStats::old_values_stats, and anonymous_namespace{TypedDataAccessors.h}::set_minmax().

Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn().

581  {
582  if (ti.get_notnull()) {
583  set_minmax(update_stats.new_values_stats.min_int64t,
584  update_stats.new_values_stats.max_int64t,
585  updated_val);
586  set_minmax(update_stats.old_values_stats.min_int64t,
587  update_stats.old_values_stats.max_int64t,
588  old_val);
589  } else {
590  set_minmax(update_stats.new_values_stats.min_int64t,
591  update_stats.new_values_stats.max_int64t,
592  update_stats.new_values_stats.has_null,
593  updated_val,
594  s(ti, updated_val));
595  set_minmax(update_stats.old_values_stats.min_int64t,
596  update_stats.old_values_stats.max_int64t,
597  update_stats.old_values_stats.has_null,
598  old_val,
599  s(ti, old_val));
600  }
601 }
void update_stats(Encoder *encoder, const SQLTypeInfo &column_type, DataBlockPtr data_block, const size_t row_count)
void set_minmax(T &min, T &max, T const val)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Fragmenter_Namespace::anonymous_namespace{UpdelStorage.cpp}::update_metadata ( SQLTypeInfo const &  ti,
ChunkUpdateStats &  update_stats,
double const  updated_val,
double const  old_val,
NullSentinelSupplier  s = NullSentinelSupplier() 
)
inline

Definition at line 603 of file UpdelStorage.cpp.

References SQLTypeInfo::get_notnull(), Fragmenter_Namespace::UpdateValuesStats::has_null, Fragmenter_Namespace::UpdateValuesStats::max_double, Fragmenter_Namespace::UpdateValuesStats::min_double, Fragmenter_Namespace::ChunkUpdateStats::new_values_stats, Fragmenter_Namespace::ChunkUpdateStats::old_values_stats, and anonymous_namespace{TypedDataAccessors.h}::set_minmax().

607  {
608  if (ti.get_notnull()) {
609  set_minmax(update_stats.new_values_stats.min_double,
610  update_stats.new_values_stats.max_double,
611  updated_val);
612  set_minmax(update_stats.old_values_stats.min_double,
613  update_stats.old_values_stats.max_double,
614  old_val);
615  } else {
616  set_minmax(update_stats.new_values_stats.min_double,
617  update_stats.new_values_stats.max_double,
618  update_stats.new_values_stats.has_null,
619  updated_val,
620  s(ti, updated_val));
621  set_minmax(update_stats.old_values_stats.min_double,
622  update_stats.old_values_stats.max_double,
623  update_stats.old_values_stats.has_null,
624  old_val,
625  s(ti, old_val));
626  }
627 }
void update_stats(Encoder *encoder, const SQLTypeInfo &column_type, DataBlockPtr data_block, const size_t row_count)
void set_minmax(T &min, T &max, T const val)

+ Here is the call graph for this function:

void Fragmenter_Namespace::anonymous_namespace{UpdelStorage.cpp}::update_metadata ( UpdateValuesStats &  agg_stats,
const UpdateValuesStats &  new_stats 
)
inline

Definition at line 629 of file UpdelStorage.cpp.

References Fragmenter_Namespace::UpdateValuesStats::has_null, Fragmenter_Namespace::UpdateValuesStats::max_double, Fragmenter_Namespace::UpdateValuesStats::max_int64t, Fragmenter_Namespace::UpdateValuesStats::min_double, and Fragmenter_Namespace::UpdateValuesStats::min_int64t.

630  {
631  agg_stats.has_null = agg_stats.has_null || new_stats.has_null;
632  agg_stats.max_double = std::max<double>(agg_stats.max_double, new_stats.max_double);
633  agg_stats.min_double = std::min<double>(agg_stats.min_double, new_stats.min_double);
634  agg_stats.max_int64t = std::max<int64_t>(agg_stats.max_int64t, new_stats.max_int64t);
635  agg_stats.min_int64t = std::min<int64_t>(agg_stats.min_int64t, new_stats.min_int64t);
636 }