Skip to content

Commit

Permalink
MINOR: [C++] Acero tiny typo fix (apache#36938)
Browse files Browse the repository at this point in the history
### Rationale for this change

1. Some typo fix in acero
2. move `std::shared_ptr<Schema>` rather than copy

### What changes are included in this PR?

1. Some typo fix in acero
2. move `std::shared_ptr<Schema>` rather than copy

### Are these changes tested?

no

### Are there any user-facing changes?

no

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
  • Loading branch information
mapleFU committed Aug 1, 2023
1 parent 7325a01 commit b8e4503
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cpp/src/arrow/acero/exec_plan.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ DeclarationToBatchesAsync(Declaration declaration, ExecContext exec_context);
/// \brief Utility method to run a declaration and return results as a RecordBatchReader
///
/// If an exec context is not provided then a default exec context will be used based
/// on the value of `use_threads`. If `use_threads` is false then the CPU exeuctor will
/// on the value of `use_threads`. If `use_threads` is false then the CPU executor will
/// be a serial executor and all CPU work will be done on the calling thread. I/O tasks
/// will still happen on the I/O executor and may be multi-threaded.
///
Expand Down
10 changes: 5 additions & 5 deletions cpp/src/arrow/acero/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ARROW_ACERO_EXPORT ExecNodeOptions {
///
/// For each batch received a new task will be created to push that batch downstream.
/// This task will slice smaller units of size `ExecPlan::kMaxBatchSize` from the
/// parent batch and call InputRecieved. Thus, if the `generator` yields a large
/// parent batch and call InputReceived. Thus, if the `generator` yields a large
/// batch it may result in several calls to InputReceived.
///
/// The SourceNode will, by default, assign an implicit ordering to outgoing batches.
Expand Down Expand Up @@ -115,7 +115,7 @@ class ARROW_ACERO_EXPORT TableSourceNodeOptions : public ExecNodeOptions {
/// Create an instance from values
TableSourceNodeOptions(std::shared_ptr<Table> table,
int64_t max_batch_size = kDefaultMaxBatchSize)
: table(table), max_batch_size(max_batch_size) {}
: table(std::move(table)), max_batch_size(max_batch_size) {}

/// \brief a table which acts as the data source
std::shared_ptr<Table> table;
Expand All @@ -135,7 +135,7 @@ class ARROW_ACERO_EXPORT NamedTableNodeOptions : public ExecNodeOptions {
public:
/// Create an instance from values
NamedTableNodeOptions(std::vector<std::string> names, std::shared_ptr<Schema> schema)
: names(std::move(names)), schema(schema) {}
: names(std::move(names)), schema(std::move(schema)) {}

/// \brief the names to put in the serialized plan
std::vector<std::string> names;
Expand All @@ -156,7 +156,7 @@ class ARROW_ACERO_EXPORT SchemaSourceNodeOptions : public ExecNodeOptions {
/// Create an instance that will create a new task on io_executor for each iteration
SchemaSourceNodeOptions(std::shared_ptr<Schema> schema, ItMaker it_maker,
arrow::internal::Executor* io_executor)
: schema(schema),
: schema(std::move(schema)),
it_maker(std::move(it_maker)),
io_executor(io_executor),
requires_io(true) {}
Expand All @@ -165,7 +165,7 @@ class ARROW_ACERO_EXPORT SchemaSourceNodeOptions : public ExecNodeOptions {
/// executor
SchemaSourceNodeOptions(std::shared_ptr<Schema> schema, ItMaker it_maker,
bool requires_io = false)
: schema(schema),
: schema(std::move(schema)),
it_maker(std::move(it_maker)),
io_executor(NULLPTR),
requires_io(requires_io) {}
Expand Down

0 comments on commit b8e4503

Please sign in to comment.