| 132 | }; |
| 133 | |
| 134 | TEST_F(VectorCompareTest, compareNullAsIndeterminateFlat) { |
| 135 | auto flatVector = |
| 136 | vectorMaker_.flatVectorNullable<int32_t>({1, std::nullopt, 3}); |
| 137 | |
| 138 | // Test equality. |
| 139 | { |
| 140 | testCompare(flatVector, 0, 0, kEquality, kEq); |
| 141 | testCompare(flatVector, 0, 2, kEquality, kNeq); |
| 142 | testCompare(flatVector, 0, 1, kEquality, kIndeterminate); |
| 143 | testCompare(flatVector, 1, 0, kEquality, kIndeterminate); |
| 144 | testCompare(flatVector, 1, 1, kEquality, kIndeterminate); |
| 145 | } |
| 146 | |
| 147 | // Test ordering with nulls. |
| 148 | { |
| 149 | testOrderingThrow(flatVector, 0, 1); |
| 150 | testOrderingThrow(flatVector, 1, 0); |
| 151 | testOrderingThrow(flatVector, 1, 1); |
| 152 | } |
| 153 | |
| 154 | // Test ordering. |
| 155 | { |
| 156 | testCompare(flatVector, 0, 0, kOrderingDesc, 0); |
| 157 | testCompare(flatVector, 0, 2, kOrderingDesc, 1); |
| 158 | testCompare(flatVector, 2, 0, kOrderingDesc, -1); |
| 159 | |
| 160 | testCompare(flatVector, 0, 0, kOrderingAsc, 0); |
| 161 | testCompare(flatVector, 0, 2, kOrderingAsc, -1); |
| 162 | testCompare(flatVector, 2, 0, kOrderingAsc, 1); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // Test SimpleVector<ComplexType>::compare() |
| 167 | TEST_F(VectorCompareTest, compareNullAsIndeterminateSimpleOfComplex) { |
nothing calls this directly
no test coverage detected