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

Method SetStrictSchema

cpp/src/arrow/json/reader.cc:118–124  ·  view source on GitHub ↗

Set the schema but ensure unexpected fields won't be accepted

Source from the content-addressed store, hash-verified

116 }
117 // Set the schema but ensure unexpected fields won't be accepted
118 void SetStrictSchema(std::shared_ptr<Schema> explicit_schema) {
119 auto unexpected_field_behavior = parse_options_.unexpected_field_behavior;
120 if (unexpected_field_behavior == UnexpectedFieldBehavior::InferType) {
121 unexpected_field_behavior = UnexpectedFieldBehavior::Error;
122 }
123 SetSchema(std::move(explicit_schema), unexpected_field_behavior);
124 }
125
126 [[nodiscard]] MemoryPool* pool() const { return pool_; }
127 [[nodiscard]] const ParseOptions& parse_options() const { return parse_options_; }

Callers 1

StreamingReaderImplMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected