You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/01 16:43:54 UTC

[GitHub] [arrow] fatemehp commented on a diff in pull request #14545: PARQUET-2209: [parquet-cpp] Optimize skip for the case that number of values to skip equals page size

fatemehp commented on code in PR #14545:
URL: https://github.com/apache/arrow/pull/14545#discussion_r1010652197


##########
cpp/src/parquet/column_reader_test.cc:
##########
@@ -303,28 +303,40 @@ TEST_F(TestPrimitiveReader, TestSkipAroundPageBoundries) {
       values_.begin() + 4 * levels_per_page);
   ASSERT_TRUE(vector_equal(sub_values, vresult));
 
+  // 3) skip_size == page_size (skip page 4 from start of the page to the end)
+  levels_skipped = reader->Skip(levels_per_page);
+  ASSERT_EQ(levels_per_page, levels_skipped);
+  // Read half a page (page 5 to 5.5)
+  reader->ReadBatch(levels_per_page / 2, dresult.data(), rresult.data(), vresult.data(),
+                    &values_read);
+  sub_values.clear();
+  sub_values.insert(
+      sub_values.end(),
+      values_.begin() + static_cast<int>(5 * static_cast<double>(levels_per_page)),
+      values_.begin() + 5.5 * levels_per_page);
+  ASSERT_TRUE(vector_equal(sub_values, vresult));
+
   // 3) skip_size < page_size (skip limited to a single page)

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org