Skip to content

Commit

Permalink
Clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuarez1423 committed Aug 15, 2022
1 parent c8fb868 commit f47cace
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions cpp/examples/tutorial_examples/compute_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ arrow::Status RunMain() {
arrow::compute::IndexOptions index_options;
// We need an Arrow Scalar, not a raw value.
index_options.value = arrow::MakeScalar(2223);
ARROW_ASSIGN_OR_RAISE(third_item, arrow::compute::CallFunction(
"index", {table->GetColumnByName("A")}, &index_options));
ARROW_ASSIGN_OR_RAISE(
third_item, arrow::compute::CallFunction("index", {table->GetColumnByName("A")},
&index_options));
// Get the kind of Datum and what it holds -- this is a Scalar, with int64
std::cout << "Datum kind: " << third_item.ToString()
<< " content type: " << third_item.type()->ToString() << std::endl;
Expand Down
10 changes: 4 additions & 6 deletions cpp/examples/tutorial_examples/dataset_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,16 @@ arrow::Status RunMain() {
auto read_format = std::make_shared<arrow::dataset::ParquetFileFormat>();
// Now, we get a factory that will let us get our dataset -- we don't have the
// dataset yet!
ARROW_ASSIGN_OR_RAISE(auto factory,
arrow::dataset::FileSystemDatasetFactory::Make(fs, selector,
read_format,
options));
ARROW_ASSIGN_OR_RAISE(auto factory, arrow::dataset::FileSystemDatasetFactory::Make(
fs, selector, read_format, options));
// Now we read into our dataset from the factory.
ARROW_ASSIGN_OR_RAISE(auto read_dataset, factory->Finish());
// Print out the fragments
ARROW_ASSIGN_OR_RAISE(auto fragments, read_dataset->GetFragments());
for (const auto& fragment : fragments) {
std::cout << "Found fragment: " << (*fragment)->ToString() << std::endl;
std::cout << "Partition expression: "
<< (*fragment)->partition_expression().ToString() << std::endl;
<< (*fragment)->partition_expression().ToString() << std::endl;
}

// Scan dataset into a Table -- once this is done, you can do
Expand Down Expand Up @@ -152,7 +150,7 @@ arrow::Status RunMain() {
// Set behavior to overwrite existing data -- specifically, this lets this example
// be run more than once, and allows whatever code you have to overwrite what's there.
write_options.existing_data_behavior =
arrow::dataset::ExistingDataBehavior::kOverwriteOrIgnore;
arrow::dataset::ExistingDataBehavior::kOverwriteOrIgnore;
// Write to disk!
ARROW_RETURN_NOT_OK(
arrow::dataset::FileSystemDataset::Write(write_options, write_scanner));
Expand Down

0 comments on commit f47cace

Please sign in to comment.