Skip to content

Commit

Permalink
Added some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
lriggs committed Mar 28, 2024
1 parent 04c97ad commit 9eb9e9f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cpp/src/gandiva/projector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <memory>
#include <utility>
#include <iostream>
#include <vector>

#include "arrow/util/logging.h"
Expand Down Expand Up @@ -162,6 +163,11 @@ Status Projector::Evaluate(const arrow::RecordBatch& batch,
const ArrayDataVector& output_data_vecs) const {
ARROW_RETURN_NOT_OK(ValidateEvaluateArgsCommon(batch));

std::cout << "Projector::Evaluate 1:" << std::endl;
std::cout << "Projector::Evaluate 1: batch=" << &batch << std::endl;
std::cout << "Projector::Evaluate 1: selection_vector=" << selection_vector << std::endl;
std::cout << "Projector::Evaluate 1: output_data_vecs=" << &output_data_vecs << std::endl;

if (output_data_vecs.size() != output_fields_.size()) {
std::stringstream ss;
ss << "number of buffers for output_data_vecs is " << output_data_vecs.size()
Expand Down Expand Up @@ -199,6 +205,12 @@ Status Projector::Evaluate(const arrow::RecordBatch& batch,
ARROW_RETURN_IF(output == nullptr, Status::Invalid("Output must be non-null."));
ARROW_RETURN_IF(pool == nullptr, Status::Invalid("Memory pool must be non-null."));

std::cout << "Projector::Evaluate 2:" << std::endl;
std::cout << "Projector::Evaluate 2: batch=" << &batch << std::endl;
std::cout << "Projector::Evaluate 2: selection_vector=" << selection_vector << std::endl;
std::cout << "Projector::Evaluate 2: pool=" << pool << std::endl;
std::cout << "Projector::Evaluate 2: output=" << output << std::endl;

auto num_rows =
selection_vector == nullptr ? batch.num_rows() : selection_vector->GetNumSlots();
// Allocate the output data vecs.
Expand Down

0 comments on commit 9eb9e9f

Please sign in to comment.