OmniSciDB  c1a53651b2
 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 578 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().

582  {
583  if (ti.get_notnull()) {
584  set_minmax(update_stats.new_values_stats.min_int64t,
585  update_stats.new_values_stats.max_int64t,
586  updated_val);
587  set_minmax(update_stats.old_values_stats.min_int64t,
588  update_stats.old_values_stats.max_int64t,
589  old_val);
590  } else {
591  set_minmax(update_stats.new_values_stats.min_int64t,
592  update_stats.new_values_stats.max_int64t,
593  update_stats.new_values_stats.has_null,
594  updated_val,
595  s(ti, updated_val));
596  set_minmax(update_stats.old_values_stats.min_int64t,
597  update_stats.old_values_stats.max_int64t,
598  update_stats.old_values_stats.has_null,
599  old_val,
600  s(ti, old_val));
601  }
602 }
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 604 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().

608  {
609  if (ti.get_notnull()) {
610  set_minmax(update_stats.new_values_stats.min_double,
611  update_stats.new_values_stats.max_double,
612  updated_val);
613  set_minmax(update_stats.old_values_stats.min_double,
614  update_stats.old_values_stats.max_double,
615  old_val);
616  } else {
617  set_minmax(update_stats.new_values_stats.min_double,
618  update_stats.new_values_stats.max_double,
619  update_stats.new_values_stats.has_null,
620  updated_val,
621  s(ti, updated_val));
622  set_minmax(update_stats.old_values_stats.min_double,
623  update_stats.old_values_stats.max_double,
624  update_stats.old_values_stats.has_null,
625  old_val,
626  s(ti, old_val));
627  }
628 }
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 630 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.

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