MCPcopy Create free account
hub / github.com/apache/arrow / BuildDecimalLValue

Method BuildDecimalLValue

cpp/src/gandiva/llvm_generator.cc:558–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558std::shared_ptr<DecimalLValue> LLVMGenerator::BuildDecimalLValue(llvm::Value* value,
559 DataTypePtr arrow_type) {
560 // only decimals of size 128-bit supported.
561 DCHECK(is_decimal_128(arrow_type));
562 auto decimal_type =
563 arrow::internal::checked_cast<arrow::DecimalType*>(arrow_type.get());
564 return std::make_shared<DecimalLValue>(value, nullptr,
565 types()->i32_constant(decimal_type->precision()),
566 types()->i32_constant(decimal_type->scale()));
567}
568
569#define ADD_VISITOR_TRACE(...) \
570 if (generator_->enable_ir_traces_) { \

Callers 3

VisitMethod · 0.80
BuildIfElseMethod · 0.80
BuildFunctionCallMethod · 0.80

Calls 5

is_decimal_128Function · 0.85
typesFunction · 0.70
getMethod · 0.45
precisionMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected