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

Function PrintConvertedType

cpp/src/parquet/schema.cc:706–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

704}
705
706static void PrintConvertedType(const PrimitiveNode* node, std::ostream& stream) {
707 auto lt = node->converted_type();
708 const auto& la = node->logical_type();
709 if (la && la->is_valid() && !la->is_none()) {
710 stream << " (" << la->ToString() << ")";
711 } else if (lt == ConvertedType::DECIMAL) {
712 stream << " (" << ConvertedTypeToString(lt) << "("
713 << node->decimal_metadata().precision << "," << node->decimal_metadata().scale
714 << "))";
715 } else if (lt != ConvertedType::NONE) {
716 stream << " (" << ConvertedTypeToString(lt) << ")";
717 }
718}
719
720struct SchemaPrinter : public Node::ConstVisitor {
721 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