wgtmac commented on PR #49086:
URL: https://github.com/apache/arrow/pull/49086#issuecomment-3839484691
IMHO, these two `Table::Make` functions look more like internal functions to
return a table instance from good schema and arrays. Should we add comments
about its intended behavior instead of introducing breaking changes like this?
We can go through a deprecation process like this:
1. In the `table.h`, define two internal functions like below and move
current implementations to them to expect good schema and arrays as input.
```cpp
namespace arrow::internal {
static std::shared_ptr<Table> MakeTable(
std::shared_ptr<Schema> schema,
std::vector<std::shared_ptr<ChunkedArray>> columns,
int64_t num_rows = -1);
static std::shared_ptr<Table> MakeTable(std::shared_ptr<Schema> schema,
const
std::vector<std::shared_ptr<Array>>& arrays,
int64_t num_rows = -1);
} // namespace arrow::internal
```
2. Adapter current `Table::Make` functions to call the above and migrate all
other references of `Table::Make` to call `arrow::internal::MakeTable`.
3. Mark current `Table::Make` as deprecated. Add new `Table::MakeTable` to
return `Result<std::unique_ptr<Table>>`.
--
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]