21 namespace spatial_type {
27 size_t size() const final {
return 1; }
41 const auto& geo_ti = col_var->get_type_info();
42 CHECK(geo_ti.is_geometry());
46 auto column_key = col_var->getColumnKey();
47 column_key.column_id = column_key.column_id + 2;
52 ring_sizes_cd->columnType, column_key, col_var->get_rte_idx());
58 const std::vector<llvm::Value*>& arg_lvs,
59 const std::vector<llvm::Value*>& pos_lvs,
63 auto& argument_lv = arg_lvs.front();
64 std::string fn_name(
"array_size");
67 std::vector<llvm::Value*> array_size_args{
70 cgen_state->llInt(
log2_bytes(elem_ti.get_logical_size()))};
75 fn_name +=
"_nullable";
76 array_size_args.push_back(cgen_state->inlineIntNull(
getTypeInfo()));
78 const auto total_num_rings_lv = cgen_state->emitExternalCall(
79 fn_name,
get_int_type(32, cgen_state->context_), array_size_args);
80 return std::make_tuple(std::vector<llvm::Value*>{total_num_rings_lv},
84 std::vector<llvm::Value*>
codegen(
const std::vector<llvm::Value*>&
args,
90 CHECK(nullcheck_codegen);
91 return {nullcheck_codegen->finalize(cgen_state->inlineIntNull(
getTypeInfo()),
94 return {
args.front()};
llvm::Type * get_int_type(const int width, llvm::LLVMContext &context)
std::tuple< std::vector< llvm::Value * >, llvm::Value * > codegenLoads(const std::vector< llvm::Value * > &arg_lvs, const std::vector< llvm::Value * > &pos_lvs, CgenState *cgen_state) final
const ColumnDescriptor * get_column_descriptor(const shared::ColumnKey &column_key)
size_t size() const final
const SQLTypeInfo & get_type_info() const
SQLTypeInfo getNullType() const final
const Analyzer::GeoOperator * operator_
Analyzer::Expr * getOperand(const size_t index) const
const Analyzer::Expr * getOperand(const size_t index) final
uint32_t log2_bytes(const uint32_t bytes)
std::vector< llvm::Value * > codegen(const std::vector< llvm::Value * > &args, CodeGenerator::NullCheckCodegen *nullcheck_codegen, CgenState *cgen_state, const CompilationOptions &co) final
SQLTypeInfo get_elem_type() const
NRings(const Analyzer::GeoOperator *geo_operator)
std::unique_ptr< Analyzer::ColumnVar > operand_owned_