| 99 | } |
| 100 | |
| 101 | static std::vector<std::shared_ptr<Schema>> SampleSchemas() { |
| 102 | auto fa1 = field("as", list(float16())); |
| 103 | auto fa2 = field("as", list(float16())); |
| 104 | auto fb1 = field("bs", utf8()); |
| 105 | auto fb2 = field("bs", utf8()); |
| 106 | auto fc1 = field("cs", list(fixed_size_binary(10))); |
| 107 | auto fc2 = field("cs", list(fixed_size_binary(10))); |
| 108 | auto fd1 = field("ds", decimal128(19, 5)); |
| 109 | auto fd2 = field("ds", decimal128(19, 5)); |
| 110 | auto fe1 = field("es", map(utf8(), int32())); |
| 111 | auto fe2 = field("es", map(utf8(), int32())); |
| 112 | auto ff1 = field("fs", dictionary(int8(), binary())); |
| 113 | auto ff2 = field("fs", dictionary(int8(), binary())); |
| 114 | auto fg1 = field( |
| 115 | "gs", struct_({field("A", int8()), field("B", int16()), field("C", float32())})); |
| 116 | auto fg2 = field( |
| 117 | "gs", struct_({field("A", int8()), field("B", int16()), field("C", float32())})); |
| 118 | auto fh1 = field("hs", large_binary()); |
| 119 | auto fh2 = field("hs", large_binary()); |
| 120 | |
| 121 | auto fz1 = field("zs", duration(TimeUnit::MICRO)); |
| 122 | auto fz2 = field("zs", duration(TimeUnit::MICRO)); |
| 123 | auto fz3 = field("zs", duration(TimeUnit::NANO)); |
| 124 | |
| 125 | auto schema1 = ::arrow::schema({fa1, fb1, fc1, fd1, fe1, ff1, fg1, fh1, fz1}); |
| 126 | auto schema2 = ::arrow::schema({fa2, fb2, fc2, fd2, fe2, ff2, fg2, fh2, fz2}); |
| 127 | auto schema3 = ::arrow::schema({fa2, fb2, fc2, fd2, fe2, ff2, fg2, fh2, fz3}); |
| 128 | |
| 129 | return {schema1, schema2, schema3}; |
| 130 | } |
| 131 | |
| 132 | static void SchemaEquals(benchmark::State& state) { // NOLINT non-const reference |
| 133 | auto schemas = SampleSchemas(); |
no test coverage detected