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

Function MakeDates

cpp/src/arrow/ipc/test_common.cc:948–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

946}
947
948Status MakeDates(std::shared_ptr<RecordBatch>* out) {
949 std::vector<bool> is_valid = {true, true, true, false, true, true, true};
950 auto f0 = field("f0", date32());
951 auto f1 = field("f1", date64());
952 auto schema = ::arrow::schema({f0, f1});
953
954 std::vector<int32_t> date32_values = {0, 1, 2, 3, 4, 5, 6};
955 std::shared_ptr<Array> date32_array;
956 ArrayFromVector<Date32Type, int32_t>(is_valid, date32_values, &date32_array);
957
958 std::vector<int64_t> date64_values = {86400000, 172800000, 259200000, 1489272000000,
959 345600000, 432000000, 518400000};
960 std::shared_ptr<Array> date64_array;
961 ArrayFromVector<Date64Type, int64_t>(is_valid, date64_values, &date64_array);
962
963 *out = RecordBatch::Make(schema, date32_array->length(), {date32_array, date64_array});
964 return Status::OK();
965}
966
967Status MakeTimestamps(std::shared_ptr<RecordBatch>* out) {
968 std::vector<bool> is_valid = {true, true, true, false, true, true, true};

Callers

nothing calls this directly

Calls 5

schemaFunction · 0.70
fieldFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50
lengthMethod · 0.45

Tested by

no test coverage detected