| 252 | }; |
| 253 | |
| 254 | TEST_F(TestSelectKWithArray, PartialSelectKNull) { |
| 255 | auto array_input = R"([null, 30, 20, 10, null])"; |
| 256 | std::vector<SortKey> sort_keys{SortKey("a", SortOrder::Ascending)}; |
| 257 | auto options = SelectKOptions(4, sort_keys); |
| 258 | auto expected = R"([10, 20, 30, null])"; |
| 259 | Check(uint8(), array_input, options, expected); |
| 260 | options.k = 3; |
| 261 | expected = R"([10, 20, 30])"; |
| 262 | Check(uint8(), array_input, options, expected); |
| 263 | options.sort_keys[0].null_placement = NullPlacement::AtStart; |
| 264 | expected = R"([null, null, 10])"; |
| 265 | Check(uint8(), array_input, options, expected); |
| 266 | } |
| 267 | |
| 268 | TEST_F(TestSelectKWithArray, FullSelectKNull) { |
| 269 | auto array_input = R"([null, 30, 20, 10, null])"; |
nothing calls this directly
no test coverage detected