20 namespace spatial_type {
23 const auto operator_name = geo_operator->
getName();
24 if (operator_name ==
"ST_NRings") {
25 return std::make_unique<NRings>(geo_operator);
26 }
else if (operator_name ==
"ST_NumGeometries") {
27 return std::make_unique<NumGeometries>(geo_operator);
28 }
else if (operator_name ==
"ST_NPoints") {
29 return std::make_unique<NPoints>(geo_operator);
30 }
else if (operator_name ==
"ST_PointN") {
31 return std::make_unique<PointN>(geo_operator);
32 }
else if (operator_name ==
"ST_StartPoint" || operator_name ==
"ST_EndPoint") {
33 return std::make_unique<StartEndPoint>(geo_operator);
34 }
else if (operator_name ==
"ST_X" || operator_name ==
"ST_Y") {
35 return std::make_unique<PointAccessors>(geo_operator);
36 }
else if (operator_name ==
"ST_Point") {
37 return std::make_unique<PointConstructor>(geo_operator);
38 }
else if (operator_name ==
"ST_Transform") {
39 return std::make_unique<Transform>(geo_operator);
40 }
else if (operator_name ==
"ST_Perimeter" || operator_name ==
"ST_Area") {
41 return std::make_unique<AreaPerimeter>(geo_operator);
42 }
else if (operator_name ==
"ST_Centroid") {
43 return std::make_unique<Centroid>(geo_operator);
44 }
else if (operator_name ==
"ST_Distance" || operator_name ==
"ST_MaxDistance") {
45 return std::make_unique<Distance>(geo_operator);
57 return std::make_unique<CodeGenerator::NullCheckCodegen>(
72 :
"point_double_is_null";
77 return std::string(
"_Point");
80 return std::string(
"_MultiPoint");
83 return std::string(
"_LineString");
86 return std::string(
"_MultiLineString");
89 return std::string(
"_Polygon");
92 return std::string(
"_MultiPolygon");
HOST DEVICE SQLTypes get_type() const
static char const * pointIsNullFunctionName(SQLTypeInfo const &)
std::string suffix(SQLTypes type)
const std::string & getName() const
std::string toString(const Executor::ExtModuleKinds &kind)
virtual SQLTypeInfo getNullType() const =0
HOST DEVICE EncodingType get_compression() const
virtual std::unique_ptr< CodeGenerator::NullCheckCodegen > getNullCheckCodegen(llvm::Value *null_lv, CgenState *cgen_state, Executor *executor)
const Analyzer::GeoOperator * operator_
virtual const Analyzer::Expr * getOperand(const size_t index)
std::string getName() const
Analyzer::Expr * getOperand(const size_t index) const
static std::unique_ptr< Codegen > init(const Analyzer::GeoOperator *geo_operator)