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/10/11 08:41:38 UTC
[GitHub] [arrow] pitrou commented on a diff in pull request #13962: ARROW-17524: [C++] Correction for fields included when reading an ORC table
pitrou commented on code in PR #13962:
URL: https://github.com/apache/arrow/pull/13962#discussion_r992017467
##########
cpp/src/arrow/adapters/orc/adapter_test.cc:
##########
@@ -450,6 +454,15 @@ TEST_F(TestORCWriterTrivialNoConversion, writeChunkless) {
std::shared_ptr<Table> table = TableFromJSON(table_schema, {});
AssertTableWriteReadEqual(table, table, kDefaultSmallMemStreamSize / 16);
}
+TEST_F(TestORCWriterTrivialNoConversion, writeTrivialChunkAndSelectField) {
+ std::shared_ptr<Table> table = TableFromJSON(table_schema, {R"([])"});
+ std::shared_ptr<Schema> schema_selected =
+ schema({field("int8", int8()), field("int32", int32())});
+ std::shared_ptr<Table> table_selected = TableFromJSON(schema_selected, {R"([])"});
+ std::vector<int> selected_indices = {1, 3};
+ AssertTableWriteReadEqual(table, table_selected, kDefaultSmallMemStreamSize / 16,
+ &selected_indices);
+}
Review Comment:
Thanks for the test but:
* can we also test with non-empty data?
* can we test selecting a field that's after the struct (to ensure field numbering is as expected)?
--
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