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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]