-
-
Save pitrou/282dd790cac0eb2c1b59e8c9ab1941d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST_F(TestArrowReconstruct, BasicList) { | |
// Arrow schema: list(bool not null) not null | |
this->SetParquetSchema( | |
PrimitiveNode::Make("node_name", Repetition::REPEATED, ParquetType::INT32)); | |
std::vector<int16_t> def_levels = {0, 1, 1, 1}; | |
std::vector<int16_t> rep_levels = {0, 0, 1, 0}; | |
std::vector<int32_t> values = {4, 5, 6}; | |
auto expected = ArrayFromJSON(list(int32()), "[[], [4, 5], [6]]"); | |
ASSERT_OK_AND_ASSIGN(auto actual, | |
this->Reconstruct<ParquetType::INT32>(def_levels, rep_levels, values)); | |
AssertArrowReconstruct(def_levels, rep_levels, values, expected); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment