Skip to content

Commit 401ae19

Browse files
authored
GH-35526: [CI][C++] Fixing arrow::internal::IsNullRunEndEncoded redeclared (#35527)
### Rationale for this change Fixing arrow::internal::IsNullRunEndEncoded redeclared. The CI will report: ``` 'bool arrow::internal::IsNullRunEndEncoded(const arrow::ArrayData&, int64_t)' redeclared without dllimport attribute after being referenced with dll linkage ``` And: ``` warning: 'selection_vector_type' may be used uninitialized ``` ### What changes are included in this PR? 1. Add `ARROW_FRIEND_EXPORT` for friend function 2. Initialize pointer in gandiva with `nullptr` ### Are these changes tested? No ### Are there any user-facing changes? No * Closes: #35526 Authored-by: mwish <maplewish117@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 4fd5c28 commit 401ae19

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

cpp/src/arrow/array/data.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,8 @@ struct ARROW_EXPORT ArraySpan {
527527
int64_t ComputeLogicalNullCount() const;
528528

529529
private:
530-
friend bool internal::IsNullRunEndEncoded(const ArrayData& span, int64_t i);
530+
ARROW_FRIEND_EXPORT friend bool internal::IsNullRunEndEncoded(const ArrayData& span,
531+
int64_t i);
531532

532533
bool IsNullSparseUnion(int64_t i) const;
533534
bool IsNullDenseUnion(int64_t i) const;

cpp/src/gandiva/llvm_generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Status LLVMGenerator::CodeGenExprValue(DexPtr value_expr, int buffer_count,
279279
arguments.push_back(types()->i64_ptr_type()); // offsets
280280
arguments.push_back(types()->i64_ptr_type()); // bitmaps
281281
arguments.push_back(types()->i64_ptr_type()); // holders
282-
llvm::Type* selection_vector_type;
282+
llvm::Type* selection_vector_type = nullptr;
283283
switch (selection_vector_mode) {
284284
case SelectionVector::MODE_NONE:
285285
case SelectionVector::MODE_UINT16:

0 commit comments

Comments
 (0)