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

Method Make

cpp/src/arrow/json/parser.cc:1172–1191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170};
1171
1172Status BlockParser::Make(MemoryPool* pool, const ParseOptions& options,
1173 std::unique_ptr<BlockParser>* out) {
1174 DCHECK(options.unexpected_field_behavior == UnexpectedFieldBehavior::InferType ||
1175 options.explicit_schema != nullptr);
1176
1177 switch (options.unexpected_field_behavior) {
1178 case UnexpectedFieldBehavior::Ignore: {
1179 *out = std::make_unique<Handler<UnexpectedFieldBehavior::Ignore>>(pool);
1180 break;
1181 }
1182 case UnexpectedFieldBehavior::Error: {
1183 *out = std::make_unique<Handler<UnexpectedFieldBehavior::Error>>(pool);
1184 break;
1185 }
1186 case UnexpectedFieldBehavior::InferType:
1187 *out = std::make_unique<Handler<UnexpectedFieldBehavior::InferType>>(pool);
1188 break;
1189 }
1190 return static_cast<HandlerBase&>(**out).Initialize(options.explicit_schema);
1191}
1192
1193Status BlockParser::Make(const ParseOptions& options, std::unique_ptr<BlockParser>* out) {
1194 return BlockParser::Make(default_memory_pool(), options, out);

Callers

nothing calls this directly

Calls 3

default_memory_poolFunction · 0.85
MakeFunction · 0.50
InitializeMethod · 0.45

Tested by

no test coverage detected