25 #ifndef QUERYENGINE_TARGETVALUE_H
26 #define QUERYENGINE_TARGETVALUE_H
28 #include <boost/optional.hpp>
29 #include <boost/variant.hpp>
52 :
i1(reinterpret_cast<int64_t>(s)),
ty(
ITVType::Str) {}
55 :
i1(reinterpret_cast<int64_t>(v)),
ty(
ITVType::Arr) {}
59 std::string
strVal()
const {
return *
reinterpret_cast<std::string*
>(
i1); }
61 std::vector<int64_t>
arrVal()
const {
62 return *
reinterpret_cast<std::vector<int64_t>*
>(
i1);
95 return !(*
this < other || other < *
this);
100 std::shared_ptr<std::vector<double>>
coords;
103 : coords(std::make_shared<std::vector<double>>(coords)) {}
107 std::shared_ptr<std::vector<double>>
coords;
110 : coords(std::make_shared<std::vector<double>>(coords)) {}
114 std::shared_ptr<std::vector<double>>
coords;
119 : coords(std::make_shared<std::vector<double>>(coords))
120 , ring_sizes(std::make_shared<std::vector<int32_t>>(ring_sizes)) {}
124 std::shared_ptr<std::vector<double>>
coords;
131 : coords(std::make_shared<std::vector<double>>(coords))
132 , ring_sizes(std::make_shared<std::vector<int32_t>>(ring_sizes))
133 , poly_rings(std::make_shared<std::vector<int32_t>>(poly_rings)) {}
167 variant<ScalarTargetValue, ArrayTargetValue, GeoTargetValue, GeoTargetValuePtr>;
169 #endif // QUERYENGINE_TARGETVALUE_H
bool operator<(const InternalTargetValue &other) const
std::string strVal() const
InternalTargetValue(const int64_t i1_)
GeoPolyTargetValue(const std::vector< double > &coords, const std::vector< int32_t > &ring_sizes)
std::shared_ptr< VarlenDatum > coords_data
GeoMultiPolyTargetValue(const std::vector< double > &coords, const std::vector< int32_t > &ring_sizes, const std::vector< int32_t > &poly_rings)
std::shared_ptr< std::vector< int32_t > > ring_sizes
std::shared_ptr< VarlenDatum > poly_rings_data
Constants for Builtin SQL Types supported by OmniSci.
std::shared_ptr< std::vector< double > > coords
InternalTargetValue(const std::string *s)
std::shared_ptr< std::vector< int32_t > > poly_rings
std::shared_ptr< std::vector< double > > coords
GeoLineStringTargetValue(const std::vector< double > &coords)
GeoPointTargetValue(const std::vector< double > &coords)
boost::optional< std::vector< ScalarTargetValue >> ArrayTargetValue
std::shared_ptr< std::vector< int32_t > > ring_sizes
std::shared_ptr< VarlenDatum > ring_sizes_data
std::shared_ptr< std::vector< double > > coords
InternalTargetValue(const int64_t i1_, const int64_t i2_)
boost::optional< boost::variant< GeoPointTargetValue, GeoLineStringTargetValue, GeoPolyTargetValue, GeoMultiPolyTargetValue >> GeoTargetValue
std::vector< int64_t > arrVal() const
std::shared_ptr< VarlenDatum > coords_data
boost::variant< std::string, void * > NullableString
std::shared_ptr< VarlenDatum > coords_data
boost::variant< ScalarTargetValue, ArrayTargetValue, GeoTargetValue, GeoTargetValuePtr > TargetValue
std::shared_ptr< VarlenDatum > coords_data
InternalTargetValue(const std::vector< int64_t > *v)
std::shared_ptr< std::vector< double > > coords
bool operator==(const InternalTargetValue &other) const
std::shared_ptr< VarlenDatum > ring_sizes_data
boost::variant< int64_t, double, float, NullableString > ScalarTargetValue
boost::variant< GeoPointTargetValuePtr, GeoLineStringTargetValuePtr, GeoPolyTargetValuePtr, GeoMultiPolyTargetValuePtr > GeoTargetValuePtr