Skip to content

Commit

Permalink
Revert "WIP"
Browse files Browse the repository at this point in the history
This reverts commit eac877b.
  • Loading branch information
zanmato1984 committed Feb 19, 2025
1 parent eac877b commit 0e0e21b
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 35 deletions.
2 changes: 0 additions & 2 deletions cpp/src/arrow/acero/accumulation_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ void AccumulationQueue::Clear() {

ExecBatch& AccumulationQueue::operator[](size_t i) { return batches_[i]; }

const ExecBatch& AccumulationQueue::operator[](size_t i) const { return batches_[i]; }

namespace {

struct LowestBatchIndexAtTop {
Expand Down
5 changes: 2 additions & 3 deletions cpp/src/arrow/acero/accumulation_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ class AccumulationQueue {

void Concatenate(AccumulationQueue&& that);
void InsertBatch(ExecBatch batch);
int64_t row_count() const { return row_count_; }
size_t batch_count() const { return batches_.size(); }
int64_t row_count() { return row_count_; }
size_t batch_count() { return batches_.size(); }
bool empty() const { return batches_.empty(); }
void Clear();
ExecBatch& operator[](size_t i);
const ExecBatch& operator[](size_t i) const;

private:
int64_t row_count_;
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/arrow/acero/hash_join_node_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3360,8 +3360,6 @@ TEST(HashJoin, LARGE_MEMORY_TEST(BuildSideOver4GBFixedLength)) {
Declaration filter{"filter", {result}, FilterNodeOptions{std::move(predicate)}};
AssertRowCountEq(std::move(filter),
num_batches_left * num_rows_per_batch_left * num_batches_right);

default_memory_pool()->PrintStats();
}

// GH-43495: Test that both the key and the payload of the right side (the build side) are
Expand Down Expand Up @@ -3449,8 +3447,6 @@ TEST(HashJoin, LARGE_MEMORY_TEST(BuildSideOver4GBVarLength)) {
Declaration filter{"filter", {result}, FilterNodeOptions{std::move(predicate)}};
AssertRowCountEq(std::move(filter),
num_batches_left * num_rows_per_batch_left * num_batches_right);

default_memory_pool()->PrintStats();
}

// GH-45334: The row ids of the matching rows on the right side (the build side) are very
Expand Down
24 changes: 0 additions & 24 deletions cpp/src/arrow/acero/swiss_join.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1101,26 +1101,6 @@ uint32_t SwissTableForJoin::payload_id_to_key_id(uint32_t payload_id) const {
return static_cast<uint32_t>(first_greater - entries) - 1;
}

struct PartitionsOfBatch {
std::vector<uint16_t> ranges;
std::vector<uint16_t> row_ids;
std::vector<uint32_t> hashes;
};

class PrePartition {
public:
explicit PrePartition(const AccumulationQueue& batches) : batches_(batches) {}

Status Init() {
partitions_.resize(batches_.batch_count());
return Status::OK();
}

private:
const AccumulationQueue& batches_;
std::vector<PartitionsOfBatch> partitions_;
};

Status SwissTableForJoinBuild::Init(SwissTableForJoin* target, int dop, int64_t num_rows,
bool reject_duplicate_keys, bool no_payload,
const std::vector<KeyColumnMetadata>& key_types,
Expand Down Expand Up @@ -2636,10 +2616,6 @@ class SwissJoin : public HashJoinImpl {
ExecBatch input_batch;
ARROW_ASSIGN_OR_RAISE(
input_batch, KeyPayloadFromInput(/*side=*/1, &build_side_batches_[batch_id]));
{
std::ignore = std::move(build_side_batches_[batch_id]);
std::cout << build_side_batches_[batch_id].values.size() << std::endl;
}

// Split batch into key batch and optional payload batch
//
Expand Down
2 changes: 0 additions & 2 deletions cpp/src/arrow/compute/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,6 @@ constexpr int64_t kUnsequencedIndex = -1;

struct ARROW_EXPORT ExecBatch {
ExecBatch() = default;
ExecBatch(ExecBatch&& other) = default;
ExecBatch(const ExecBatch& other) = default;
ExecBatch(std::vector<Datum> values, int64_t length)
: values(std::move(values)), length(length) {}

Expand Down

0 comments on commit 0e0e21b

Please sign in to comment.