| 107 | // ---------------------------------------------------------------------- |
| 108 | |
| 109 | TEST(GetTakeIndices, Basics) { |
| 110 | // Drop null cases |
| 111 | CheckTakeIndicesCase("[]", "[]", FilterOptions::DROP); |
| 112 | CheckTakeIndicesCase("[null]", "[]", FilterOptions::DROP); |
| 113 | CheckTakeIndicesCase("[null, false, true, true, false, true]", "[2, 3, 5]", |
| 114 | FilterOptions::DROP); |
| 115 | |
| 116 | // Emit null cases |
| 117 | CheckTakeIndicesCase("[]", "[]", FilterOptions::EMIT_NULL); |
| 118 | CheckTakeIndicesCase("[null]", "[null]", FilterOptions::EMIT_NULL); |
| 119 | CheckTakeIndicesCase("[null, false, true, true]", "[null, 2, 3]", |
| 120 | FilterOptions::EMIT_NULL); |
| 121 | } |
| 122 | |
| 123 | TEST(GetTakeIndices, NullValidityBuffer) { |
| 124 | BooleanArray filter(1, *AllocateEmptyBitmap(1), /*null_bitmap=*/nullptr); |
nothing calls this directly
no test coverage detected