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

Function PrintConvertedType

cpp/src/parquet/schema.cc:673–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673static void PrintConvertedType(const PrimitiveNode* node, std::ostream& stream) {
674 auto lt = node->converted_type();
675 const auto& la = node->logical_type();
676 if (la && la->is_valid() && !la->is_none()) {
677 stream << " (" << la->ToString() << ")";
678 } else if (lt == ConvertedType::DECIMAL) {
679 stream << " (" << ConvertedTypeToString(lt) << "("
680 << node->decimal_metadata().precision << "," << node->decimal_metadata().scale
681 << "))";
682 } else if (lt != ConvertedType::NONE) {
683 stream << " (" << ConvertedTypeToString(lt) << ")";
684 }
685}
686
687struct SchemaPrinter : public Node::ConstVisitor {
688 explicit SchemaPrinter(std::ostream& stream, int indent_width)

Callers 1

VisitMethod · 0.85

Calls 4

ConvertedTypeToStringFunction · 0.85
is_noneMethod · 0.80
is_validMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected