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

Method TestInts

cpp/src/arrow/flight/test_definitions.cc:755–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755void DoPutTest::TestInts() {
756 auto descr = FlightDescriptor::Path({"ints"});
757 RecordBatchVector batches;
758 auto a0 = ArrayFromJSON(int8(), "[0, 1, 127, -128, null]");
759 auto a1 = ArrayFromJSON(uint8(), "[0, 1, 127, 255, null]");
760 auto a2 = ArrayFromJSON(int16(), "[0, 258, 32767, -32768, null]");
761 auto a3 = ArrayFromJSON(uint16(), "[0, 258, 32767, 65535, null]");
762 auto a4 = ArrayFromJSON(int32(), "[0, 65538, 2147483647, -2147483648, null]");
763 auto a5 = ArrayFromJSON(uint32(), "[0, 65538, 2147483647, 4294967295, null]");
764 auto a6 = ArrayFromJSON(
765 int64(), "[0, 4294967298, 9223372036854775807, -9223372036854775808, null]");
766 auto a7 = ArrayFromJSON(
767 uint64(), "[0, 4294967298, 9223372036854775807, 18446744073709551615, null]");
768 auto schema = arrow::schema({field("f0", a0->type()), field("f1", a1->type()),
769 field("f2", a2->type()), field("f3", a3->type()),
770 field("f4", a4->type()), field("f5", a5->type()),
771 field("f6", a6->type()), field("f7", a7->type())});
772 batches.push_back(
773 RecordBatch::Make(schema, a0->length(), {a0, a1, a2, a3, a4, a5, a6, a7}));
774
775 CheckDoPut(descr, schema, batches);
776}
777
778void DoPutTest::TestFloats() {
779 auto descr = FlightDescriptor::Path({"floats"});

Callers

nothing calls this directly

Calls 8

ArrayFromJSONFunction · 0.85
push_backMethod · 0.80
PathFunction · 0.70
schemaFunction · 0.50
fieldFunction · 0.50
MakeFunction · 0.50
typeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected