Skip to content

Commit

Permalink
GH-35526: [CI][C++] Fixing arrow::internal::IsNullRunEndEncoded redec…
Browse files Browse the repository at this point in the history
…lared (#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>
  • Loading branch information
mapleFU committed May 11, 2023
1 parent 4fd5c28 commit 401ae19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cpp/src/arrow/array/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ struct ARROW_EXPORT ArraySpan {
int64_t ComputeLogicalNullCount() const;

private:
friend bool internal::IsNullRunEndEncoded(const ArrayData& span, int64_t i);
ARROW_FRIEND_EXPORT friend bool internal::IsNullRunEndEncoded(const ArrayData& span,
int64_t i);

bool IsNullSparseUnion(int64_t i) const;
bool IsNullDenseUnion(int64_t i) const;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/gandiva/llvm_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Status LLVMGenerator::CodeGenExprValue(DexPtr value_expr, int buffer_count,
arguments.push_back(types()->i64_ptr_type()); // offsets
arguments.push_back(types()->i64_ptr_type()); // bitmaps
arguments.push_back(types()->i64_ptr_type()); // holders
llvm::Type* selection_vector_type;
llvm::Type* selection_vector_type = nullptr;
switch (selection_vector_mode) {
case SelectionVector::MODE_NONE:
case SelectionVector::MODE_UINT16:
Expand Down

0 comments on commit 401ae19

Please sign in to comment.