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

Classes

struct  is_catalog_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)
 
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
 

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 468 of file RelAlgDagSerializer.h.

Referenced by load_construct_data().

470  {
471  ::new (node) RelAlgNodeType(td);
472 }

+ 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 477 of file RelAlgDagSerializer.h.

479  {
480  ::new (node) RelModify(cat, td);
481 }
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:501
void set_size(int s)
Definition: sqltypes.h:498
SQLTypes
Definition: sqltypes.h:53
HOST DEVICE void set_subtype(SQLTypes st)
Definition: sqltypes.h:491
EncodingType
Definition: sqltypes.h:228
void set_scale(int s)
Definition: sqltypes.h:495
void set_comp_param(int p)
Definition: sqltypes.h:502
void set_dimension(int d)
Definition: sqltypes.h:492
void set_dict_intersection()
Definition: sqltypes.h:500
void set_notnull(bool n)
Definition: sqltypes.h:497
HOST DEVICE void set_type(SQLTypes t)
Definition: sqltypes.h:490

+ 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 67 of file QueryHintSerializer.h.

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

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

67  {
68  std::vector<int> inherit_paths;
69  std::vector<std::string> list_options;
70  std::unordered_map<std::string, std::string> kv_options;
71  ar >> inherit_paths;
72  query_hint.setInheritPaths(inherit_paths);
73  ar >> list_options;
74  query_hint.setListOptions(list_options);
75  ar >> kv_options;
76  query_hint.setKVOptions(kv_options);
77 }
void setListOptions(std::vector< std::string > &list_options)
Definition: QueryHint.h:134
void setKVOptions(std::unordered_map< std::string, std::string > &kv_options)
Definition: QueryHint.h:138
void setInheritPaths(std::vector< int > &interit_paths)
Definition: QueryHint.h:142

+ 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:530
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
NullSortedPosition
Definition: RelAlgDag.h:532

+ 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 90 of file QueryHintSerializer.h.

92  {
93  QueryHint hint;
94  bool global_hint;
95  bool is_marker;
96  bool has_kv_type_options;
97  ar >> hint;
98  ar >> global_hint;
99  ar >> is_marker;
100  ar >> has_kv_type_options;
101  ::new (query_hint)
102  ExplainedQueryHint(hint, global_hint, is_marker, has_kv_type_options);
103 }
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 496 of file RelAlgDagSerializer.h.

References cat(), construct_catalog_rel_alg_node(), and RelAlgDagSerializer::getCatalog().

498  {
499  std::string table_name;
500  ar >> table_name;
502  const TableDescriptor* td{nullptr};
503  if (!table_name.empty()) {
504  td = cat.getMetadataForTable(table_name, false);
505  }
507 }
std::string cat(Ts &&...args)
static const Catalog_Namespace::Catalog & getCatalog()
void construct_catalog_rel_alg_node(RelAlgNodeType *node, const Catalog_Namespace::Catalog &cat, const TableDescriptor *td)

+ 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:381
HOST DEVICE int get_size() const
Definition: sqltypes.h:390
HOST DEVICE int get_scale() const
Definition: sqltypes.h:385
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:380
bool is_dict_intersection() const
Definition: sqltypes.h:645
HOST DEVICE EncodingType get_compression() const
Definition: sqltypes.h:388
HOST DEVICE int get_dimension() const
Definition: sqltypes.h:382
HOST DEVICE int get_comp_param() const
Definition: sqltypes.h:389
HOST DEVICE bool get_notnull() const
Definition: sqltypes.h:387

+ 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 60 of file QueryHintSerializer.h.

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

60  {
61  ar << query_hint.getInteritPath();
62  ar << query_hint.getListOptions();
63  ar << query_hint.getKVOptions();
64 }
const std::vector< int > & getInteritPath() const
Definition: QueryHint.h:148
const std::unordered_map< std::string, std::string > & getKVOptions() const
Definition: QueryHint.h:150
const std::vector< std::string > & getListOptions() const
Definition: QueryHint.h:146

+ Here is the call 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:548
size_t getField() const
Definition: RelAlgDag.h:546
NullSortedPosition getNullsPosition() const
Definition: RelAlgDag.h:550

+ 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 80 of file QueryHintSerializer.h.

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

82  {
83  ar << query_hint->getHint();
84  ar << query_hint->isGlobalHint();
85  ar << query_hint->hasOptions();
86  ar << query_hint->hasKvOptions();
87 }
bool isGlobalHint() const
Definition: QueryHint.h:156
bool hasKvOptions() const
Definition: QueryHint.h:160
bool hasOptions() const
Definition: QueryHint.h:158
const QueryHint getHint() const
Definition: QueryHint.h:154

+ 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 447 of file RelAlgDagSerializer.h.

References CHECK.

449  {
450  auto* td = node->getTableDescriptor();
451  if (td) {
452  CHECK(!td->tableName.empty());
453  ar << td->tableName;
454  } else {
455  // we need to serialize an empty string as deserialization will expect to see a
456  // string. The empty string will indicate a null table descriptor. There are many
457  // circumstances in which a catalog-dependent RelAlgNode might have a null
458  // TableDescriptor. Generally speaking, RelScan and RelModify nodes require a valid
459  // table descriptor. RelCompound and RelProject do not.
460  ar << std::string();
461  }
462 }
#define CHECK(condition)
Definition: Logger.h:222
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 28 of file QueryHintSerializer.h.

References RegisteredQueryHint::aggregate_tree_fanout, RegisteredQueryHint::columnar_output, RegisteredQueryHint::cpu_mode, RegisteredQueryHint::cuda_block_size, RegisteredQueryHint::cuda_grid_size_multiplier, RegisteredQueryHint::dynamic_watchdog, RegisteredQueryHint::keep_result, RegisteredQueryHint::keep_table_function_result, RegisteredQueryHint::loop_join_inner_table_max_num_rows, RegisteredQueryHint::max_join_hash_table_size, RegisteredQueryHint::overlaps_allow_gpu_build, RegisteredQueryHint::overlaps_bucket_threshold, RegisteredQueryHint::overlaps_keys_per_bin, RegisteredQueryHint::overlaps_max_size, RegisteredQueryHint::overlaps_no_cache, RegisteredQueryHint::query_time_limit, RegisteredQueryHint::registered_hint, RegisteredQueryHint::rowwise_output, RegisteredQueryHint::use_loop_join, and RegisteredQueryHint::watchdog.

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

28  {
29  (ar & query_hint.cpu_mode);
30  (ar & query_hint.columnar_output);
31  (ar & query_hint.rowwise_output);
32  (ar & query_hint.keep_result);
33  (ar & query_hint.keep_table_function_result);
34  (ar & query_hint.watchdog);
35  (ar & query_hint.dynamic_watchdog);
36  (ar & query_hint.query_time_limit);
37  (ar & query_hint.cuda_block_size);
38  (ar & query_hint.cuda_grid_size_multiplier);
39  (ar & query_hint.aggregate_tree_fanout);
40  (ar & query_hint.overlaps_bucket_threshold);
41  (ar & query_hint.overlaps_max_size);
42  (ar & query_hint.overlaps_allow_gpu_build);
43  (ar & query_hint.overlaps_no_cache);
44  (ar & query_hint.overlaps_keys_per_bin);
45  (ar & query_hint.use_loop_join);
46  (ar & query_hint.max_join_hash_table_size);
47  (ar & query_hint.loop_join_inner_table_max_num_rows);
48  (ar & query_hint.registered_hint);
49 }
bool overlaps_allow_gpu_build
Definition: QueryHint.h:318
double overlaps_keys_per_bin
Definition: QueryHint.h:320
std::optional< bool > dynamic_watchdog
Definition: QueryHint.h:304
double cuda_grid_size_multiplier
Definition: QueryHint.h:309
size_t cuda_block_size
Definition: QueryHint.h:308
std::vector< bool > registered_hint
Definition: QueryHint.h:327
size_t max_join_hash_table_size
Definition: QueryHint.h:325
bool keep_table_function_result
Definition: QueryHint.h:302
size_t query_time_limit
Definition: QueryHint.h:305
std::optional< bool > watchdog
Definition: QueryHint.h:303
size_t overlaps_max_size
Definition: QueryHint.h:317
std::optional< bool > use_loop_join
Definition: QueryHint.h:323
size_t loop_join_inner_table_max_num_rows
Definition: QueryHint.h:324
double overlaps_bucket_threshold
Definition: QueryHint.h:316
size_t aggregate_tree_fanout
Definition: QueryHint.h:313

+ 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 52 of file QueryHintSerializer.h.

52  {
53  // need to split serialization into separate load/store methods since members are only
54  // accessible through getters/setters. See:
55  // https://www.boost.org/doc/libs/1_74_0/libs/serialization/doc/serialization.html#splitting
56  split_free(ar, query_hint, version);
57 }
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 393 of file RelAlgDagSerializer.h.

References RelAlgDagSerializer::serialize().

395  {
397 }
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 402 of file RelAlgDagSerializer.h.

References RelAlgDagSerializer::serialize().

404  {
406 }
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 412 of file RelAlgDagSerializer.h.

412  {
413  // no-op. does nothing with an empty class
414 }

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 432 of file RelAlgDagSerializer.h.