Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bolt/dwio/parquet/reader/PageReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,10 @@ void PageReader::skip(int64_t numRows) {
}
firstUnvisited_ += numRows;

if (toSkip == 0) {
return;
}

// Skip nulls
toSkip = skipNulls(toSkip);

Expand Down
Binary file not shown.
17 changes: 15 additions & 2 deletions bolt/dwio/parquet/tests/reader/ParquetTableScanTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,6 @@ TEST_F(ParquetTableScanTest, decimalSubfieldFilter) {
"Scalar function signature is not supported: eq(DECIMAL(5, 2), DECIMAL(5, 1))");
}

// Core dump is fixed.
TEST_F(ParquetTableScanTest, map) {
auto vector = makeMapVector<StringView, StringView>({{{"name", "gluten"}}});

Expand Down Expand Up @@ -461,7 +460,6 @@ TEST_F(ParquetTableScanTest, nullMap) {
assertSelectWithFilter({"i", "c"}, {}, "", "SELECT i, c FROM tmp");
}

// Core dump is fixed.
TEST_F(ParquetTableScanTest, singleRowStruct) {
auto vector = makeArrayVector<int32_t>({{}});
loadData(
Expand Down Expand Up @@ -590,6 +588,21 @@ TEST_F(ParquetTableScanTest, reqArrayLegacy) {
"SELECT UNNEST(array[array['a', 'b'], array[], array['c', 'd']])");
}

TEST_F(ParquetTableScanTest, filterOnNestedArray) {
loadData(
getExampleFilePath("struct_of_array.parquet"),
ROW({"struct"},
{ROW({"a0", "a1"}, {ARRAY(VARCHAR()), ARRAY(INTEGER())})}),
makeRowVector(
{"unused"},
{
makeFlatVector<int32_t>({}),
}));

assertSelectWithFilter(
{"struct"}, {}, "struct.a0 is null", "SELECT ROW(NULL, NULL)");
}

TEST_F(ParquetTableScanTest, readAsLowerCase) {
auto plan = PlanBuilder(pool_.get())
.tableScan(ROW({"a"}, {BIGINT()}), {}, "")
Expand Down
Loading
Loading