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

Function GetTypeForNode

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

Source from the content-addressed store, hash-verified

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