| 1546 | } |
| 1547 | |
| 1548 | void CheckDictionaryCompact(const std::shared_ptr<DataType>& dict_type, |
| 1549 | const std::string& input_dictionary_json, |
| 1550 | const std::string& input_index_json, |
| 1551 | const std::string& expected_dictionary_json, |
| 1552 | const std::string& expected_index_json) { |
| 1553 | auto input = DictArrayFromJSON(dict_type, input_index_json, input_dictionary_json); |
| 1554 | const DictionaryArray& input_ref = checked_cast<const DictionaryArray&>(*input); |
| 1555 | |
| 1556 | auto expected = |
| 1557 | DictArrayFromJSON(dict_type, expected_index_json, expected_dictionary_json); |
| 1558 | |
| 1559 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> actual, input_ref.Compact()); |
| 1560 | AssertArraysEqual(*expected, *actual, /*verbose=*/true); |
| 1561 | } |
| 1562 | |
| 1563 | TEST(TestDictionary, Compact) { |
| 1564 | std::shared_ptr<arrow::DataType> type; |
no test coverage detected