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

Function GetTypeForNode

cpp/src/parquet/arrow/schema.cc:549–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547// Schema logic
548
549::arrow::Result<std::shared_ptr<ArrowType>> GetTypeForNode(
550 int column_index, const schema::PrimitiveNode& primitive_node,
551 SchemaTreeContext* ctx) {
552 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<ArrowType> storage_type,
553 GetArrowType(primitive_node, ctx->properties, ctx->metadata));
554 if (ctx->properties.read_dictionary(column_index) &&
555 IsDictionaryReadSupported(*storage_type)) {
556 return ::arrow::dictionary(::arrow::int32(), storage_type);
557 }
558 return storage_type;
559}
560
561Status NodeToSchemaField(const Node& node, LevelInfo current_levels,
562 SchemaTreeContext* ctx, const SchemaField* parent,

Callers 2

ResolveListFunction · 0.85
NodeToSchemaFieldFunction · 0.85

Calls 5

read_dictionaryMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
GetArrowTypeFunction · 0.70
dictionaryFunction · 0.50

Tested by

no test coverage detected