| 965 | } |
| 966 | |
| 967 | Status MakeTimestamps(std::shared_ptr<RecordBatch>* out) { |
| 968 | std::vector<bool> is_valid = {true, true, true, false, true, true, true}; |
| 969 | auto f0 = field("f0", timestamp(TimeUnit::MILLI)); |
| 970 | auto f1 = field("f1", timestamp(TimeUnit::NANO, "America/New_York")); |
| 971 | auto f2 = field("f2", timestamp(TimeUnit::SECOND)); |
| 972 | auto schema = ::arrow::schema({f0, f1, f2}); |
| 973 | |
| 974 | std::vector<int64_t> ts_values = {1489269000000, 1489270000000, 1489271000000, |
| 975 | 1489272000000, 1489272000000, 1489273000000}; |
| 976 | |
| 977 | std::shared_ptr<Array> a0, a1, a2; |
| 978 | ArrayFromVector<TimestampType, int64_t>(f0->type(), is_valid, ts_values, &a0); |
| 979 | ArrayFromVector<TimestampType, int64_t>(f1->type(), is_valid, ts_values, &a1); |
| 980 | ArrayFromVector<TimestampType, int64_t>(f2->type(), is_valid, ts_values, &a2); |
| 981 | |
| 982 | *out = RecordBatch::Make(schema, a0->length(), {a0, a1, a2}); |
| 983 | return Status::OK(); |
| 984 | } |
| 985 | |
| 986 | Status MakeIntervals(std::shared_ptr<RecordBatch>* out) { |
| 987 | std::vector<bool> is_valid = {true, true, true, false, true, true, true}; |