Skip to content

Commit

Permalink
Comments (tyvm for the helpful reviews)
Browse files Browse the repository at this point in the history
  • Loading branch information
JerAguilon committed Oct 31, 2023
1 parent 8420bd5 commit 7f525b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/acero/asof_join_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct TolType {
};

// Maximum number of tables that can be joined
#define MAX_JOIN_TABLES 4 // NOCOMMIT
#define MAX_JOIN_TABLES 64
typedef uint64_t row_index_t;
typedef int col_index_t;

Expand Down Expand Up @@ -904,7 +904,7 @@ class CompositeTableBuilder {
for (int src = 0; src < input->get_schema()->num_fields(); src++) {
auto dst = input->MapSrcToDst(src);
if (dst.has_value()) {
dst_to_src[dst.value()] = std::make_pair(i, src);
dst_to_src[dst.value()] = std::make_pair(static_cast<int>(i), src);
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions cpp/src/arrow/acero/sorted_merge_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "arrow/acero/options.h"
#include "arrow/acero/test_nodes.h"
#include "arrow/array/builder_base.h"
#include "arrow/array/concatenate.h"
#include "arrow/compute/ordering.h"
#include "arrow/result.h"
#include "arrow/scalar.h"
Expand Down Expand Up @@ -76,10 +77,11 @@ TEST(SortedMergeNode, Basic) {
for (auto i : {0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 15, 18}) {
ASSERT_OK(expected_ts_builder->AppendScalar(*MakeScalar(i)));
}
ASSERT_OK_AND_ASSIGN(auto expected_timestamps, expected_ts_builder->Finish());
auto chunked_array =
std::make_shared<arrow::ChunkedArray>(std::move(expected_timestamps));
ASSERT_TRUE(chunked_array->Equals(output->column(0)))
<< chunked_array->ToString() << " " << output->column(0)->ToString();
ASSERT_OK_AND_ASSIGN(auto expected_ts, expected_ts_builder->Finish());
auto output_col = output->column(0);
ASSERT_OK_AND_ASSIGN(auto output_ts, Concatenate(output_col->chunks()));

AssertArraysEqual(*expected_ts, *output_ts);
}

} // namespace arrow::acero

0 comments on commit 7f525b2

Please sign in to comment.