OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
boost::serialization Namespace Reference

Classes

struct  is_catalog_rel_alg_node
 
struct  is_modify_target_rel_alg_node
 

Functions

template<class Archive >
void serialize (Archive &ar, RegisteredQueryHint &query_hint, const unsigned int version)
 
template<class Archive >
void serialize (Archive &ar, ExplainedQueryHint &query_hint, const unsigned int version)
 
template<class Archive >
void save (Archive &ar, const ExplainedQueryHint &query_hint, const unsigned int version)
 
template<class Archive >
void load (Archive &ar, ExplainedQueryHint &query_hint, const unsigned int version)
 
template<class Archive >
void save_construct_data (Archive &ar, const ExplainedQueryHint *query_hint, const unsigned int version)
 
template<class Archive >
void load_construct_data (Archive &ar, ExplainedQueryHint *query_hint, const unsigned int version)
 
template<class RelAlgType , typename std::enable_if_t< all_serializable_rel_alg_classes_v< RelAlgType >> * = nullptr>
void serialize (boost::archive::text_iarchive &ar, RelAlgType &obj, const unsigned int version)
 
template<class RelAlgType , typename std::enable_if_t< all_serializable_rel_alg_classes_v< RelAlgType >> * = nullptr>
void serialize (boost::archive::text_oarchive &ar, RelAlgType &obj, const unsigned int version)
 
template<class Archive >
void serialize (Archive &ar, boost::blank &blank, const unsigned int version)
 
template<class RelAlgNodeType , typename std::enable_if_t< is_catalog_rel_alg_node_v< RelAlgNodeType >> * = nullptr>
void save_construct_data (boost::archive::text_oarchive &ar, const RelAlgNodeType *node, const unsigned int version)
 
template<class RelAlgNodeType >
void construct_catalog_rel_alg_node (RelAlgNodeType *node, const Catalog_Namespace::Catalog *cat, const TableDescriptor *td)
 
void construct_catalog_rel_alg_node (RelModify *node, const Catalog_Namespace::Catalog &cat, const TableDescriptor *td)
 
void construct_catalog_rel_alg_node (RelScan *node, const Catalog_Namespace::Catalog &cat, const TableDescriptor *td)
 
template<class RelAlgNodeType , typename std::enable_if_t< is_catalog_rel_alg_node< RelAlgNodeType >::value > * = nullptr>
void load_construct_data (boost::archive::text_iarchive &ar, RelAlgNodeType *node, const unsigned int version)
 
template<class Archive >
void serialize (Archive &ar, RexWindowFunctionOperator::RexWindowBound &window_bound, const unsigned int version)
 
template<class Archive >
void serialize (Archive &, SortField &, const unsigned int)
 
template<class Archive >
void save_construct_data (Archive &ar, const SortField *sort_field, const unsigned int version)
 
template<class Archive >
void load_construct_data (Archive &ar, SortField *sort_field, const unsigned int version)
 
template<class Archive >
void serialize (Archive &ar, SQLTypeInfo &type_info, const unsigned int version)
 
template<class Archive >
void save (Archive &ar, const SQLTypeInfo &type_info, const unsigned int version)
 
template<class Archive >
void load (Archive &ar, SQLTypeInfo &type_info, const unsigned int version)
 
template<class Archive , class T >
void serialize (Archive &ar, std::optional< T > &in_opt, const unsigned int version)
 
template<class Archive >
void serialize (Archive &, TargetMetaInfo &, const unsigned int)
 
template<class Archive >
void save_construct_data (Archive &ar, const TargetMetaInfo *target_meta, const unsigned int version)
 
template<class Archive >
void load_construct_data (Archive &ar, TargetMetaInfo *target_meta, const unsigned int version)
 

Variables

template<class T >
constexpr bool is_catalog_rel_alg_node_v = is_catalog_rel_alg_node<T>::value
 
template<class T >
constexpr bool is_modify_target_rel_alg_node_v
 

Function Documentation

template<class RelAlgNodeType >
void boost::serialization::construct_catalog_rel_alg_node ( RelAlgNodeType *  node,
const Catalog_Namespace::Catalog cat,
const TableDescriptor td 
)
inline

Construction templates for TableDescriptor dependent classes

Definition at line 467 of file RelAlgDagSerializer.h.

Referenced by load_construct_data().

469  {
470  ::new (node) RelAlgNodeType(td, cat);
471 }

+ Here is the caller graph for this function:

void boost::serialization::construct_catalog_rel_alg_node ( RelModify node,
const Catalog_Namespace::Catalog cat,
const TableDescriptor td 
)
inline

RelModify construction specialization, which requires a catalog reference

Definition at line 476 of file RelAlgDagSerializer.h.

478  {
479  ::new (node) RelModify(cat, td);
480 }
void boost::serialization::construct_catalog_rel_alg_node ( RelScan node,
const Catalog_Namespace::Catalog cat,
const TableDescriptor td 
)
inline

RelScan construction specialization, which requires a catalog reference

Definition at line 485 of file RelAlgDagSerializer.h.

487  {
488  ::new (node) RelScan(td, cat);
489 }
template<class Archive >
void boost::serialization::load ( Archive ar,
SQLTypeInfo type_info,
const unsigned int  version 
)

Definition at line 52 of file SQLTypeInfoSerializer.h.

References SQLTypeInfo::set_comp_param(), SQLTypeInfo::set_compression(), SQLTypeInfo::set_dict_intersection(), SQLTypeInfo::set_dimension(), SQLTypeInfo::set_notnull(), SQLTypeInfo::set_scale(), SQLTypeInfo::set_size(), SQLTypeInfo::set_subtype(), SQLTypeInfo::set_type(), and run_benchmark_import::type.

52  {
53  SQLTypes type;
54  SQLTypes subtype;
55  int dimension{0};
56  int scale{0};
57  bool notnull{false};
58  EncodingType compression;
59  int comp_param{0};
60  int size{0};
61  bool is_dict_intersection{false};
62 
63  ar >> type;
64  type_info.set_type(type);
65  ar >> subtype;
66  type_info.set_subtype(subtype);
67  ar >> dimension;
68  type_info.set_dimension(dimension);
69  ar >> scale;
70  type_info.set_scale(scale);
71  ar >> notnull;
72  type_info.set_notnull(notnull);
73  ar >> compression;
74  type_info.set_compression(compression);
75  ar >> comp_param;
76  type_info.set_comp_param(comp_param);
77  ar >> size;
78  type_info.set_size(size);
79  ar >> is_dict_intersection;
80  if (is_dict_intersection) {
81  type_info.set_dict_intersection();
82  }
83 }
void set_compression(EncodingType c)
Definition: sqltypes.h:481
void set_size(int s)
Definition: sqltypes.h:478
SQLTypes
Definition: sqltypes.h:65
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:471
EncodingType
Definition: sqltypes.h:240
void set_scale(int s)
Definition: sqltypes.h:475
void set_comp_param(int p)
Definition: sqltypes.h:482
void set_dimension(int d)
Definition: sqltypes.h:472
void set_dict_intersection()
Definition: sqltypes.h:480
void set_notnull(bool n)
Definition: sqltypes.h:477
HOST DEVICE void set_type(SQLTypes t)
Definition: sqltypes.h:470

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::load ( Archive ar,
ExplainedQueryHint query_hint,
const unsigned int  version 
)

Definition at line 73 of file QueryHintSerializer.h.

References ExplainedQueryHint::setInheritPaths(), ExplainedQueryHint::setKVOptions(), and ExplainedQueryHint::setListOptions().

Referenced by load_module(), ReductionInterpreterImpl::runLoad(), tf_test_torch_load_model(), and anonymous_namespace{ResultSetReductionCodegen.cpp}::translate_body().

73  {
74  std::vector<int> inherit_paths;
75  std::vector<std::string> list_options;
76  std::unordered_map<std::string, std::string> kv_options;
77  ar >> inherit_paths;
78  query_hint.setInheritPaths(inherit_paths);
79  ar >> list_options;
80  query_hint.setListOptions(list_options);
81  ar >> kv_options;
82  query_hint.setKVOptions(kv_options);
83 }
void setListOptions(std::vector< std::string > &list_options)
Definition: QueryHint.h:147
void setKVOptions(std::unordered_map< std::string, std::string > &kv_options)
Definition: QueryHint.h:151
void setInheritPaths(std::vector< int > &interit_paths)
Definition: QueryHint.h:155

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Archive >
void boost::serialization::load_construct_data ( Archive ar,
SortField sort_field,
const unsigned int  version 
)
inline

Definition at line 44 of file SortFieldSerializer.h.

References field().

46  {
47  size_t field;
48  SortDirection sort_dir;
49  NullSortedPosition nulls_pos;
50  ar >> field;
51  ar >> sort_dir;
52  ar >> nulls_pos;
53  ::new (sort_field) SortField(field, sort_dir, nulls_pos);
54 }
SortDirection
Definition: RelAlgDag.h:531
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:33
NullSortedPosition
Definition: RelAlgDag.h:533

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::load_construct_data ( Archive ar,
TargetMetaInfo target_meta,
const unsigned int  version 
)
inline

Definition at line 45 of file TargetMetaInfoSerializer.h.

47  {
48  std::string resname;
49  SQLTypeInfo ti;
50  SQLTypeInfo physical_ti;
51  ar >> resname;
52  ar >> ti;
53  ar >> physical_ti;
54  ::new (target_meta) TargetMetaInfo(resname, ti, physical_ti);
55 }
template<class Archive >
void boost::serialization::load_construct_data ( Archive ar,
ExplainedQueryHint query_hint,
const unsigned int  version 
)
inline

Definition at line 96 of file QueryHintSerializer.h.

98  {
99  QueryHint hint;
100  bool global_hint;
101  bool is_marker;
102  bool has_kv_type_options;
103  ar >> hint;
104  ar >> global_hint;
105  ar >> is_marker;
106  ar >> has_kv_type_options;
107  ::new (query_hint)
108  ExplainedQueryHint(hint, global_hint, is_marker, has_kv_type_options);
109 }
QueryHint
Definition: QueryHint.h:29
template<class RelAlgNodeType , typename std::enable_if_t< is_catalog_rel_alg_node< RelAlgNodeType >::value > * = nullptr>
void boost::serialization::load_construct_data ( boost::archive::text_iarchive &  ar,
RelAlgNodeType *  node,
const unsigned int  version 
)
inline

Loads constructor data and instantiates TableDescriptor-dependent classes by loading the table name and accessing its table descriptor from a thread-local catalog reference.

NOTE: for proper overload resolution of boost::serialization::load_construct_data while maintaining templatization on RelAlgNode type, this function is specialized on the Archive type, in this case boost::archive::text_iarchive. This would break if other archives are used.

Definition at line 504 of file RelAlgDagSerializer.h.

References cat(), CHECK, construct_catalog_rel_alg_node(), Catalog_Namespace::SysCatalog::getCatalog(), and Catalog_Namespace::SysCatalog::instance().

506  {
507  std::string db_name;
508  ar >> db_name;
509  const Catalog_Namespace::Catalog* cat{nullptr};
510  const TableDescriptor* td{nullptr};
511  if (!db_name.empty()) {
513  CHECK(cat) << "Catalog not found for database: " << db_name;
514  }
515 
516  std::string table_name;
517  ar >> table_name;
518  if (!table_name.empty()) {
519  CHECK(cat);
520  td = cat->getMetadataForTable(table_name, false);
521  CHECK(td) << "Table metadata not found for table: " << table_name
522  << " in catalog: " << cat->name();
523  }
524 
525  if constexpr (is_modify_target_rel_alg_node_v<RelAlgNodeType>) {
527  } else {
528  CHECK(cat);
530  }
531 }
std::string cat(Ts &&...args)
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:143
static SysCatalog & instance()
Definition: SysCatalog.h:343
std::shared_ptr< Catalog > getCatalog(const std::string &dbName)
void construct_catalog_rel_alg_node(RelAlgNodeType *node, const Catalog_Namespace::Catalog *cat, const TableDescriptor *td)
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::save ( Archive ar,
const SQLTypeInfo type_info,
const unsigned int  version 
)

Definition at line 39 of file SQLTypeInfoSerializer.h.

References SQLTypeInfo::get_comp_param(), SQLTypeInfo::get_compression(), SQLTypeInfo::get_dimension(), SQLTypeInfo::get_notnull(), SQLTypeInfo::get_scale(), SQLTypeInfo::get_size(), SQLTypeInfo::get_subtype(), SQLTypeInfo::get_type(), and SQLTypeInfo::is_dict_intersection().

39  {
40  ar << type_info.get_type();
41  ar << type_info.get_subtype();
42  ar << type_info.get_dimension();
43  ar << type_info.get_scale();
44  ar << type_info.get_notnull();
45  ar << type_info.get_compression();
46  ar << type_info.get_comp_param();
47  ar << type_info.get_size();
48  ar << type_info.is_dict_intersection();
49 }
HOST DEVICE SQLTypes get_subtype() const
Definition: sqltypes.h:392
HOST DEVICE int get_size() const
Definition: sqltypes.h:403
HOST DEVICE int get_scale() const
Definition: sqltypes.h:396
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:391
bool is_dict_intersection() const
Definition: sqltypes.h:660
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:399
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:393
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:402
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:398

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::save ( Archive ar,
const ExplainedQueryHint query_hint,
const unsigned int  version 
)

Definition at line 66 of file QueryHintSerializer.h.

References ExplainedQueryHint::getInteritPath(), ExplainedQueryHint::getKVOptions(), and ExplainedQueryHint::getListOptions().

Referenced by tf_test_torch_regression().

66  {
67  ar << query_hint.getInteritPath();
68  ar << query_hint.getListOptions();
69  ar << query_hint.getKVOptions();
70 }
const std::vector< int > & getInteritPath() const
Definition: QueryHint.h:161
const std::unordered_map< std::string, std::string > & getKVOptions() const
Definition: QueryHint.h:163
const std::vector< std::string > & getListOptions() const
Definition: QueryHint.h:159

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Archive >
void boost::serialization::save_construct_data ( Archive ar,
const SortField sort_field,
const unsigned int  version 
)
inline

Definition at line 35 of file SortFieldSerializer.h.

References SortField::getField(), SortField::getNullsPosition(), and SortField::getSortDir().

37  {
38  ar << sort_field->getField();
39  ar << sort_field->getSortDir();
40  ar << sort_field->getNullsPosition();
41 }
SortDirection getSortDir() const
Definition: RelAlgDag.h:549
size_t getField() const
Definition: RelAlgDag.h:547
NullSortedPosition getNullsPosition() const
Definition: RelAlgDag.h:551

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::save_construct_data ( Archive ar,
const TargetMetaInfo target_meta,
const unsigned int  version 
)
inline

Definition at line 36 of file TargetMetaInfoSerializer.h.

References TargetMetaInfo::get_physical_type_info(), TargetMetaInfo::get_resname(), and TargetMetaInfo::get_type_info().

38  {
39  ar << target_meta->get_resname();
40  ar << target_meta->get_type_info();
41  ar << target_meta->get_physical_type_info();
42 }
const SQLTypeInfo & get_type_info() const
const SQLTypeInfo & get_physical_type_info() const
const std::string & get_resname() const

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::save_construct_data ( Archive ar,
const ExplainedQueryHint query_hint,
const unsigned int  version 
)
inline

Definition at line 86 of file QueryHintSerializer.h.

References ExplainedQueryHint::getHint(), ExplainedQueryHint::hasKvOptions(), ExplainedQueryHint::hasOptions(), and ExplainedQueryHint::isGlobalHint().

88  {
89  ar << query_hint->getHint();
90  ar << query_hint->isGlobalHint();
91  ar << query_hint->hasOptions();
92  ar << query_hint->hasKvOptions();
93 }
bool isGlobalHint() const
Definition: QueryHint.h:169
bool hasKvOptions() const
Definition: QueryHint.h:173
bool hasOptions() const
Definition: QueryHint.h:171
const QueryHint getHint() const
Definition: QueryHint.h:167

+ Here is the call graph for this function:

template<class RelAlgNodeType , typename std::enable_if_t< is_catalog_rel_alg_node_v< RelAlgNodeType >> * = nullptr>
void boost::serialization::save_construct_data ( boost::archive::text_oarchive &  ar,
const RelAlgNodeType *  node,
const unsigned int  version 
)
inline

Saves constructor data for TableDescriptor-dependent classes by saving out the table descriptor name. The table name seems like the best choice for a synchonization-independent descriptor. It was not immediately obvious whether the table id is the same across all nodes in a distributed cluster, for instance.

NOTE: for proper overload resolution of boost::serialization::save_construct_data while maintaining templatization on RelAlgNode type, this function is specialized on the Archive type, in this case boost::archive::text_oarchive. If other archive types are to be used, then they would need to have specializations added here.

Definition at line 433 of file RelAlgDagSerializer.h.

References CHECK, and Catalog_Namespace::Catalog::name().

435  {
436  const Catalog_Namespace::Catalog* catalog{nullptr};
437  if constexpr (is_modify_target_rel_alg_node_v<RelAlgNodeType>) {
438  catalog = node->getModifiedTableCatalog();
439  } else {
440  catalog = &node->getCatalog();
441  }
442 
443  if (catalog) {
444  ar << catalog->name();
445  } else {
446  ar << std::string();
447  }
448 
449  auto* td = node->getTableDescriptor();
450  if (td) {
451  CHECK(!td->tableName.empty());
452  ar << td->tableName;
453  } else {
454  // we need to serialize an empty string as deserialization will expect to see a
455  // string. The empty string will indicate a null table descriptor. There are many
456  // circumstances in which a catalog-dependent RelAlgNode might have a null
457  // TableDescriptor. Generally speaking, RelScan and RelModify nodes require a valid
458  // table descriptor. RelCompound and RelProject do not.
459  ar << std::string();
460  }
461 }
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:143
std::string name() const
Definition: Catalog.h:348
#define CHECK(condition)
Definition: Logger.h:291

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::serialize ( Archive ,
SortField ,
const unsigned  int 
)

Definition at line 25 of file SortFieldSerializer.h.

25  {
26  // We will not serialize anything directly from SortField instances and instead
27  // serialize constructor data. This is handled in the save/load_construct_data functions
28  // below below. See:
29  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#constructors
30  // for more.
31  // We still need to provide this no-op method for compilation tho.
32 }
template<class Archive >
void boost::serialization::serialize ( Archive ,
TargetMetaInfo ,
const unsigned  int 
)

Definition at line 26 of file TargetMetaInfoSerializer.h.

26  {
27  // We will not serialize anything directly from TargetMetaInfo instances and instead
28  // serialize constructor data. This is handled in the save/load_construct_data functions
29  // below below. See:
30  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#constructors
31  // for more.
32  // We still need to provide this no-op method for compilation tho.
33 }
template<class Archive >
void boost::serialization::serialize ( Archive ar,
RegisteredQueryHint query_hint,
const unsigned int  version 
)

Definition at line 27 of file QueryHintSerializer.h.

References RegisteredQueryHint::aggregate_tree_fanout, RegisteredQueryHint::bbox_intersect_allow_gpu_build, RegisteredQueryHint::bbox_intersect_bucket_threshold, RegisteredQueryHint::bbox_intersect_keys_per_bin, RegisteredQueryHint::bbox_intersect_max_size, RegisteredQueryHint::bbox_intersect_no_cache, RegisteredQueryHint::columnar_output, RegisteredQueryHint::cpu_mode, RegisteredQueryHint::cuda_block_size, RegisteredQueryHint::cuda_grid_size_multiplier, RegisteredQueryHint::dynamic_watchdog, RegisteredQueryHint::force_baseline_hash_join, RegisteredQueryHint::force_one_to_many_hash_join, RegisteredQueryHint::keep_result, RegisteredQueryHint::keep_table_function_result, RegisteredQueryHint::loop_join_inner_table_max_num_rows, RegisteredQueryHint::max_join_hash_table_size, RegisteredQueryHint::ndv_groups_estimator_multiplier, RegisteredQueryHint::opt_cuda_grid_and_block_size, RegisteredQueryHint::preflight_count_query_threshold, RegisteredQueryHint::query_time_limit, RegisteredQueryHint::registered_hint, RegisteredQueryHint::rowwise_output, RegisteredQueryHint::table_reordering_off, RegisteredQueryHint::use_loop_join, RegisteredQueryHint::watchdog, and RegisteredQueryHint::watchdog_max_projected_rows_per_device.

Referenced by BOOST_CLASS_TRACKING(), and anonymous_namespace{ResultSetIteration.cpp}::GeoTargetValueBuilder< GEO_SOURCE_TYPE, GeoTargetFetcher >::build().

27  {
28  (ar & query_hint.cpu_mode);
29  (ar & query_hint.columnar_output);
30  (ar & query_hint.rowwise_output);
31  (ar & query_hint.bbox_intersect_bucket_threshold);
32  (ar & query_hint.bbox_intersect_max_size);
33  (ar & query_hint.bbox_intersect_allow_gpu_build);
34  (ar & query_hint.bbox_intersect_no_cache);
35  (ar & query_hint.bbox_intersect_keys_per_bin);
36  (ar & query_hint.keep_result);
37  (ar & query_hint.keep_table_function_result);
38  (ar & query_hint.aggregate_tree_fanout);
39  (ar & query_hint.cuda_block_size);
40  (ar & query_hint.cuda_grid_size_multiplier);
41  (ar & query_hint.opt_cuda_grid_and_block_size);
42  (ar & query_hint.watchdog);
43  (ar & query_hint.dynamic_watchdog);
44  (ar & query_hint.query_time_limit);
45  (ar & query_hint.use_loop_join);
46  (ar & query_hint.loop_join_inner_table_max_num_rows);
47  (ar & query_hint.max_join_hash_table_size);
48  (ar & query_hint.force_baseline_hash_join);
49  (ar & query_hint.force_one_to_many_hash_join);
51  (ar & query_hint.preflight_count_query_threshold);
52  (ar & query_hint.table_reordering_off);
53  (ar & query_hint.ndv_groups_estimator_multiplier);
54  (ar & query_hint.registered_hint);
55 }
double bbox_intersect_keys_per_bin
Definition: QueryHint.h:368
std::optional< bool > dynamic_watchdog
Definition: QueryHint.h:347
double cuda_grid_size_multiplier
Definition: QueryHint.h:356
size_t cuda_block_size
Definition: QueryHint.h:355
std::vector< bool > registered_hint
Definition: QueryHint.h:377
size_t max_join_hash_table_size
Definition: QueryHint.h:373
bool opt_cuda_grid_and_block_size
Definition: QueryHint.h:357
bool keep_table_function_result
Definition: QueryHint.h:345
size_t query_time_limit
Definition: QueryHint.h:348
double bbox_intersect_bucket_threshold
Definition: QueryHint.h:363
double ndv_groups_estimator_multiplier
Definition: QueryHint.h:352
size_t watchdog_max_projected_rows_per_device
Definition: QueryHint.h:349
std::optional< bool > watchdog
Definition: QueryHint.h:346
size_t preflight_count_query_threshold
Definition: QueryHint.h:350
size_t bbox_intersect_max_size
Definition: QueryHint.h:365
bool force_baseline_hash_join
Definition: QueryHint.h:374
bool bbox_intersect_no_cache
Definition: QueryHint.h:367
std::optional< bool > use_loop_join
Definition: QueryHint.h:371
size_t loop_join_inner_table_max_num_rows
Definition: QueryHint.h:372
bool bbox_intersect_allow_gpu_build
Definition: QueryHint.h:366
size_t aggregate_tree_fanout
Definition: QueryHint.h:360
bool force_one_to_many_hash_join
Definition: QueryHint.h:375

+ Here is the caller graph for this function:

template<class Archive >
void boost::serialization::serialize ( Archive ar,
SQLTypeInfo type_info,
const unsigned int  version 
)

Definition at line 31 of file SQLTypeInfoSerializer.h.

31  {
32  // need to split serialization of type_info into separate load/store methods defined
33  // above. See 'Splitting Free Functions' section of
34  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#splitting
35  split_free(ar, type_info, version);
36 }
string version
Definition: setup.in.py:73
template<class Archive >
void boost::serialization::serialize ( Archive ar,
ExplainedQueryHint query_hint,
const unsigned int  version 
)

Definition at line 58 of file QueryHintSerializer.h.

58  {
59  // need to split serialization into separate load/store methods since members are only
60  // accessible through getters/setters. See:
61  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#splitting
62  split_free(ar, query_hint, version);
63 }
string version
Definition: setup.in.py:73
template<class Archive , class T >
void boost::serialization::serialize ( Archive ar,
std::optional< T > &  in_opt,
const unsigned int  version 
)

boost surprisingly does not have native support for serializing std::optional values from STL. This is a workaround for that by converting a std::optional to a boost::optional for serialization. There is a compilation issue with using the standard boost::serialization::split_free to handle different pathways for load/store of a std::optional. This compilation issue requires a workaround. The commented out code below is what would be used if the split_free route compiles, so keeping it around in case one day it does work as it would be preferred. More on the compilation issue in comments below.

Definition at line 68 of file StdOptionalSerializer.h.

68  {
69  // NOTE: uncomment if we find that a more recent gcc or boost works
70  // ::boost::serialization::split_free(ar, in_opt, version);
71 
72  // The if constexpr block below is a workaround to what appears to be a gcc v9.4.0 bug.
73  // The preferred way to split the load/save code paths is to use the
74  // boost::serialization::split_free:
75  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#splitting
76  //
77  // However, doing it the split_free way, which means overriding the save/load free
78  // functions for std::optional, results in a very strange compilation error.
79  // The parent header file for doing RelAlgDag serialization does a:
80  // #include <boost/serialization/shared_ptr.hpp>
81  //
82  // shared_ptr.hpp in turn does a:
83  // #include <boost/serialization/shared_ptr_helper.hpp>
84  // see:
85  // https://www.boost.org/doc/libs/1_74_0/boost/serialization/shared_ptr.hpp)
86  //
87  // shared_ptr_helper.hpp has this ifndef block:
88  //
89  // #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
90  // template<class Archive, template<class U> class SPT >
91  // void load(
92  // Archive & ar,
93  // SPT< class U > &t,
94  // const unsigned int file_version
95  // );
96  // #endif
97  //
98  // see: https://www.boost.org/doc/libs/1_74_0/boost/serialization/shared_ptr_helper.hpp
99  //
100  // That load free-function declaration confuses gcc, and you get a compilation error
101  // like this:
102  //
103  // clang-format off
104  //
105  // In file included from /usr/include/c++/9/bits/move.h:55,
106  // from /usr/include/c++/9/bits/stl_pair.h:59,
107  // from /usr/include/c++/9/utility:70,
108  // from /usr/include/c++/9/algorithm:60,
109  // from ../QueryEngine/Execute.h:20,
110  // from heavydb-internal/build/QueryEngine/CMakeFiles/QueryEngine.dir/cmake_pch.hxx:5,
111  // from <command-line>:
112  // /usr/include/c++/9/type_traits: In instantiation of ‘struct std::__is_trivially_copy_constructible_impl<boost::serialization::U, true>’:
113  // /usr/include/c++/9/type_traits:1157:12: required from ‘struct std::is_trivially_copy_constructible<boost::serialization::U>’
114  // /usr/include/c++/9/type_traits:2938:25: required from ‘constexpr const bool std::is_trivially_copy_constructible_v<boost::serialization::U>’
115  // /usr/include/c++/9/optional:469:12: required by substitution of ‘template<class Archive, template<class U> class SPT> void boost::serialization::load(Archive&, SPT<boost::serialization::U>&, unsigned int) [with Archive = boost::archive::text_iarchive; SPT = <missing>]’
116  // /usr/include/boost/serialization/split_free.hpp:58:13: required from ‘static void boost::serialization::free_loader<Archive, T>::invoke(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = std::optional<long unsigned int>]’
117  // /usr/include/boost/serialization/split_free.hpp:74:18: required from ‘void boost::serialization::split_free(Archive&, T&, unsigned int) [with Archive = boost::archive::text_iarchive; T = std::optional<long unsigned int>]’
118  // ../QueryEngine/RelAlgSerializerOptional.h:52:37: [ skipping 42 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
119  // /usr/include/boost/archive/detail/iserializer.hpp:624:18: required from ‘void boost::archive::load(Archive&, T&) [with Archive = boost::archive::text_iarchive; T = RelAlgDag]’
120  // /usr/include/boost/archive/detail/common_iarchive.hpp:67:22: required from ‘void boost::archive::detail::common_iarchive<Archive>::load_override(T&) [with T = RelAlgDag; Archive = boost::archive::text_iarchive]’
121  // /usr/include/boost/archive/basic_text_iarchive.hpp:70:9: required from ‘void boost::archive::basic_text_iarchive<Archive>::load_override(T&) [with T = RelAlgDag; Archive = boost::archive::text_iarchive]’
122  // /usr/include/boost/archive/text_iarchive.hpp:82:52: required from ‘void boost::archive::text_iarchive_impl<Archive>::load_override(T&) [with T = RelAlgDag; Archive = boost::archive::text_iarchive]’
123  // /usr/include/boost/archive/detail/interface_iarchive.hpp:68:9: required from ‘Archive& boost::archive::detail::interface_iarchive<Archive>::operator>>(T&) [with T = RelAlgDag; Archive = boost::archive::text_iarchive]’
124  // ../QueryEngine/RelAlgDagSerializer/RelAlgDagSerializer.cpp:70:12: required from here
125  // /usr/include/c++/9/type_traits:1150:12: error: invalid use of incomplete type ‘class boost::serialization::U’
126  // 1150 | struct __is_trivially_copy_constructible_impl<_Tp, true>
127  // | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128  // In file included from /usr/include/boost/serialization/shared_ptr.hpp:29,
129  // from ../QueryEngine/RelAlgDagSerializer/RelAlgDagSerializer.h:25,
130  // from ../QueryEngine/RelAlgDagSerializer/RelAlgDagSerializer.cpp:17:
131  // /usr/include/boost/serialization/shared_ptr_helper.hpp:45:16: note: forward declaration of ‘class boost::serialization::U’
132  // 45 | SPT< class U > &t,
133  // | ^
134  // In file included from /usr/include/c++/9/bits/move.h:55,
135  // from /usr/include/c++/9/bits/stl_pair.h:59,
136  // from /usr/include/c++/9/utility:70,
137  // from /usr/include/c++/9/algorithm:60,
138  // from ../QueryEngine/Execute.h:20,
139  // from heavydb-internal/build/QueryEngine/CMakeFiles/QueryEngine.dir/cmake_pch.hxx:5,
140  // from <command-line>:
141  //
142  //
143  // clang-format on
144  //
145  // It appears as tho there's a gcc bug that confuses the load() free function
146  // declaration in shared_ptr_helper.hpp when trying to resolve overrides with the
147  // two-argument template and somehow substitutes the second template argument with a
148  // boost::serialization::U class type, which does not exist.
149  //
150  // So the workaround is to use the if contexpr switch and pull the definitions of the
151  // load/save free functions for std::optional directly into the serialize override,
152  // which works fine and has no other conflicts.
153  //
154  // If we find that we upgrade to a more recent version of gcc and it works, we can move
155  // back to the split_free approach, which is commented out above.
156 
157  if constexpr (std::is_same_v<::boost::archive::text_iarchive, Archive>) {
158  // load case
159  boost::optional<T> boost_opt;
160  (ar & boost_opt);
161 
162  if (boost_opt) {
163  in_opt = *boost_opt;
164  } else {
165  // probably unnecessary
166  in_opt.reset();
167  }
168  } else {
169  // save case
170  static_assert(std::is_same_v<::boost::archive::text_oarchive, Archive>);
171  boost::optional<T> boost_opt;
172  if (in_opt) {
173  boost_opt = *in_opt;
174  }
175  (ar & boost_opt);
176  }
177 }
template<class RelAlgType , typename std::enable_if_t< all_serializable_rel_alg_classes_v< RelAlgType >> * = nullptr>
void boost::serialization::serialize ( boost::archive::text_iarchive &  ar,
RelAlgType &  obj,
const unsigned int  version 
)

boost::serialization::serialize overload for all RelAlgDag-related classes that require serialization.

NOTE: for proper overload resolution of boost::serialization::serialize while maintaining templatization on the RelAlgDag-related class type, this function is specialized on the Archive type. If other archive types are to be used, they need to be specialized here.

Definition at line 370 of file RelAlgDagSerializer.h.

References RelAlgDagSerializer::serialize().

372  {
374 }
static void serialize(Archive &ar, RexClass &obj, const unsigned int version)
string version
Definition: setup.in.py:73

+ Here is the call graph for this function:

template<class RelAlgType , typename std::enable_if_t< all_serializable_rel_alg_classes_v< RelAlgType >> * = nullptr>
void boost::serialization::serialize ( boost::archive::text_oarchive &  ar,
RelAlgType &  obj,
const unsigned int  version 
)

Definition at line 379 of file RelAlgDagSerializer.h.

References RelAlgDagSerializer::serialize().

381  {
383 }
static void serialize(Archive &ar, RexClass &obj, const unsigned int version)
string version
Definition: setup.in.py:73

+ Here is the call graph for this function:

template<class Archive >
void boost::serialization::serialize ( Archive ar,
boost::blank &  blank,
const unsigned int  version 
)

Needed for boost::variant with a boost::blank item.

Definition at line 389 of file RelAlgDagSerializer.h.

389  {
390  // no-op. does nothing with an empty class
391 }

Variable Documentation

template<class T >
constexpr bool boost::serialization::is_catalog_rel_alg_node_v = is_catalog_rel_alg_node<T>::value
inline

Definition at line 409 of file RelAlgDagSerializer.h.

template<class T >
constexpr bool boost::serialization::is_modify_target_rel_alg_node_v
inline
Initial value:
=
is_modify_target_rel_alg_node<T>::value

Definition at line 417 of file RelAlgDagSerializer.h.