23 #ifndef QUERYENGINE_TARGETVALUE_H
24 #define QUERYENGINE_TARGETVALUE_H
26 #include <boost/optional.hpp>
27 #include <boost/variant.hpp>
50 :
i1(reinterpret_cast<int64_t>(s)),
ty(
ITVType::Str) {}
53 :
i1(reinterpret_cast<int64_t>(v)),
ty(
ITVType::Arr) {}
57 std::string
strVal()
const {
return *
reinterpret_cast<std::string*
>(
i1); }
59 std::vector<int64_t>
arrVal()
const {
60 return *
reinterpret_cast<std::vector<int64_t>*
>(
i1);
93 return !(*
this < other || other < *
this);
98 std::shared_ptr<std::vector<double>>
coords;
101 : coords(std::make_shared<std::vector<double>>(coords)) {}
105 std::shared_ptr<std::vector<double>>
coords;
108 : coords(std::make_shared<std::vector<double>>(coords)) {}
112 std::shared_ptr<std::vector<double>>
coords;
115 : coords(std::make_shared<std::vector<double>>(coords)) {}
119 std::shared_ptr<std::vector<double>>
coords;
124 : coords(std::make_shared<std::vector<double>>(coords))
125 , linestring_sizes(std::make_shared<std::vector<int32_t>>(linestring_sizes)) {}
129 std::shared_ptr<std::vector<double>>
coords;
134 : coords(std::make_shared<std::vector<double>>(coords))
135 , ring_sizes(std::make_shared<std::vector<int32_t>>(ring_sizes)) {}
139 std::shared_ptr<std::vector<double>>
coords;
146 : coords(std::make_shared<std::vector<double>>(coords))
147 , ring_sizes(std::make_shared<std::vector<int32_t>>(ring_sizes))
148 , poly_rings(std::make_shared<std::vector<int32_t>>(poly_rings)) {}
195 variant<ScalarTargetValue, ArrayTargetValue, GeoTargetValue, GeoTargetValuePtr>;
197 #endif // QUERYENGINE_TARGETVALUE_H
bool operator<(const InternalTargetValue &other) const
std::string strVal() const
InternalTargetValue(const int64_t i1_)
std::shared_ptr< VarlenDatum > linestring_sizes_data
GeoPolyTargetValue(const std::vector< double > &coords, const std::vector< int32_t > &ring_sizes)
GeoMultiLineStringTargetValue(const std::vector< double > &coords, const std::vector< int32_t > &linestring_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 HEAVY.AI.
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)
std::shared_ptr< std::vector< double > > coords
std::shared_ptr< std::vector< int32_t > > linestring_sizes
boost::optional< std::vector< ScalarTargetValue >> ArrayTargetValue
std::shared_ptr< std::vector< int32_t > > ring_sizes
std::shared_ptr< VarlenDatum > ring_sizes_data
boost::optional< boost::variant< GeoPointTargetValue, GeoMultiPointTargetValue, GeoLineStringTargetValue, GeoMultiLineStringTargetValue, GeoPolyTargetValue, GeoMultiPolyTargetValue >> GeoTargetValue
std::shared_ptr< std::vector< double > > coords
std::shared_ptr< VarlenDatum > coords_data
InternalTargetValue(const int64_t i1_, const int64_t i2_)
boost::variant< GeoPointTargetValuePtr, GeoMultiPointTargetValuePtr, GeoLineStringTargetValuePtr, GeoMultiLineStringTargetValuePtr, GeoPolyTargetValuePtr, GeoMultiPolyTargetValuePtr > GeoTargetValuePtr
std::vector< int64_t > arrVal() const
std::shared_ptr< VarlenDatum > coords_data
std::shared_ptr< std::vector< double > > coords
boost::variant< std::string, void * > NullableString
GeoMultiPointTargetValue(const std::vector< double > &coords)
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
std::shared_ptr< VarlenDatum > coords_data
boost::variant< int64_t, double, float, NullableString > ScalarTargetValue