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

Function TEST

cpp/src/arrow/json/parser_test.cc:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105// TODO(bkietz) parameterize (at least some of) these tests over UnexpectedFieldBehavior
106
107TEST(BlockParserWithSchema, Basics) {
108 auto options = ParseOptions::Defaults();
109 options.explicit_schema =
110 schema({field("hello", float64()), field("world", boolean()), field("yo", utf8())});
111 options.unexpected_field_behavior = UnexpectedFieldBehavior::Ignore;
112 AssertParseColumns(
113 options, scalars_only_src(),
114 {field("hello", utf8()), field("world", boolean()), field("yo", utf8())},
115 {"[\"3.5\", \"3.25\", \"3.125\", \"0.0\"]", "[false, null, null, true]",
116 "[\"thing\", null, \"\xe5\xbf\x8d\", null]"});
117}
118
119TEST(BlockParserWithSchema, Empty) {
120 auto options = ParseOptions::Defaults();

Callers

nothing calls this directly

Calls 13

AssertParseColumnsFunction · 0.85
scalars_only_srcFunction · 0.85
unquoted_decimal_srcFunction · 0.85
mixed_decimal_srcFunction · 0.85
listFunction · 0.85
struct_Function · 0.85
nested_srcFunction · 0.85
null_srcFunction · 0.85
ParseFromStringFunction · 0.70
DefaultsFunction · 0.50
schemaFunction · 0.50
fieldFunction · 0.50

Tested by

no test coverage detected