Skip to content

Commit f964bd6

Browse files
committed
Rebase
1 parent e8e58a5 commit f964bd6

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

‎cpp/src/arrow/array/builder_primitive.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class NumericBuilder : public ArrayBuilder {
9595
value_type operator[](int64_t index) const { return GetValue(index); }
9696

9797
value_type& operator[](int64_t index) {
98-
return reinterpret_cast<value_type*>(data_->mutable_data())[index];
98+
return reinterpret_cast<value_type*>(data_builder_.mutable_data())[index];
9999
}
100100

101101
/// \brief Append a sequence of elements in one shot

‎cpp/src/arrow/compute/kernels/hash.cc‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,12 @@ class UniqueAction : public ActionBase {
104104
// ----------------------------------------------------------------------
105105
// Count values implementation (see HashKernel for description of methods)
106106

107-
class ValueCountsAction {
107+
class ValueCountsAction : ActionBase {
108108
public:
109+
using ActionBase::ActionBase;
110+
109111
ValueCountsAction(const std::shared_ptr<DataType>& type, MemoryPool* pool)
110-
: count_builder_(pool) {}
112+
: ActionBase(type, pool), count_builder_(pool) {}
111113

112114
Status Reserve(const int64_t length) {
113115
// builder size is independent of input array size.
@@ -122,6 +124,8 @@ class ValueCountsAction {
122124
// or incur the cost of memory copies.
123125
Status Flush(Datum* out) { return Status::OK(); }
124126

127+
std::shared_ptr<DataType> out_type() const { return type_; }
128+
125129
// Return the counts corresponding the MemoTable keys.
126130
Status FlushFinal(Datum* out) {
127131
std::shared_ptr<ArrayData> result;

0 commit comments

Comments
 (0)