kou commented on code in PR #14187:
URL: https://github.com/apache/arrow/pull/14187#discussion_r977201363


##########
cpp/src/arrow/filesystem/s3_test_util.cc:
##########
@@ -37,6 +37,7 @@
 // We need BOOST_USE_WINDOWS_H definition with MinGW when we use
 // boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
 // cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
+#define BOOST_NO_CXX98_FUNCTION_BASE  // ARROW-17805

Review Comment:
   ditto.



##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -31,6 +31,7 @@
 // We need BOOST_USE_WINDOWS_H definition with MinGW when we use
 // boost/process.hpp. See BOOST_USE_WINDOWS_H=1 in
 // cpp/cmake_modules/ThirdpartyToolchain.cmake for details.
+#define BOOST_NO_CXX98_FUNCTION_BASE  // ARROW-17805

Review Comment:
   Could you move this to `#20` (before `// This boost/asio/...`) to avoid 
confusing the above `// We need ...` comment target?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -621,7 +634,8 @@ void LLVMGenerator::Visitor::Visit(const 
VectorReadVarLenValueDex& dex) {
   // get the data from the data array, at offset 'offset_start'.
   llvm::Value* data_slot_ref =
       GetBufferReference(dex.DataIdx(), kBufferTypeData, dex.Field());
-  llvm::Value* data_value = CreateGEP(builder, data_slot_ref, offset_start);
+  llvm::Value* data_value =

Review Comment:
   Can we use `auto` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -1278,8 +1294,8 @@ std::vector<llvm::Value*> 
LLVMGenerator::Visitor::BuildParams(
     llvm::BasicBlock* saved_block = builder->GetInsertBlock();
     builder->SetInsertPoint(entry_block_);
 
-    llvm::Value* holder =
-        generator_->LoadVectorAtIndex(arg_holder_ptrs_, holder_idx, "holder");
+    llvm::Value* holder = generator_->LoadVectorAtIndex(

Review Comment:
   Can we use `auto` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -831,7 +845,7 @@ void LLVMGenerator::Visitor::Visit(const 
NullableInternalFuncDex& dex) {
   result_ = BuildFunctionCall(native_function, arrow_return_type, &params);
 
   // load the result validity and truncate to i1.
-  llvm::Value* result_valid_i8 = CreateLoad(builder, result_valid_ptr);
+  llvm::Value* result_valid_i8 = builder->CreateLoad(types->i8_type(), 
result_valid_ptr);

Review Comment:
   Can we use `auto` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -378,7 +386,8 @@ Status LLVMGenerator::CodeGenExprValue(DexPtr value_expr, 
int buffer_count,
     SetPackedBitValue(output_ref, loop_var, output_value->data());
   } else if (arrow::is_primitive(output_type_id) ||
              output_type_id == arrow::Type::DECIMAL) {
-    llvm::Value* slot_offset = CreateGEP(builder, output_ref, loop_var);
+    llvm::Value* slot_offset =

Review Comment:
   Can we use `auto` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -605,14 +617,15 @@ void LLVMGenerator::Visitor::Visit(const 
VectorReadVarLenValueDex& dex) {
       builder->CreateAdd(loop_var_, GetSliceOffset(dex.OffsetsIdx()));
 
   // => offset_start = offsets[loop_var]
-  slot = CreateGEP(builder, offsets_slot_ref, offsets_slot_index);
-  llvm::Value* offset_start = CreateLoad(builder, slot, "offset_start");
+  slot = builder->CreateGEP(types->i32_type(), offsets_slot_ref, 
offsets_slot_index);
+  llvm::Value* offset_start =
+      builder->CreateLoad(types->i32_type(), slot, "offset_start");
 
   // => offset_end = offsets[loop_var + 1]
   llvm::Value* offsets_slot_index_next = builder->CreateAdd(
       offsets_slot_index, generator_->types()->i64_constant(1), "loop_var+1");
-  slot = CreateGEP(builder, offsets_slot_ref, offsets_slot_index_next);
-  llvm::Value* offset_end = CreateLoad(builder, slot, "offset_end");
+  slot = builder->CreateGEP(types->i32_type(), offsets_slot_ref, 
offsets_slot_index_next);
+  llvm::Value* offset_end = builder->CreateLoad(types->i32_type(), slot, 
"offset_end");

Review Comment:
   Can we use `auto` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -278,16 +279,20 @@ 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;
   switch (selection_vector_mode) {
     case SelectionVector::MODE_NONE:
     case SelectionVector::MODE_UINT16:
       arguments.push_back(types()->ptr_type(types()->i16_type()));
+      selection_vector_type = types()->i16_type();
       break;
     case SelectionVector::MODE_UINT32:
       arguments.push_back(types()->i32_ptr_type());
+      selection_vector_type = types()->i32_type();
       break;
     case SelectionVector::MODE_UINT64:
       arguments.push_back(types()->i64_ptr_type());
+      selection_vector_type = types()->i64_type();

Review Comment:
   It's not related to this pull request but could you also add `break;` here?



##########
cpp/src/gandiva/llvm_generator.cc:
##########
@@ -605,14 +617,15 @@ void LLVMGenerator::Visitor::Visit(const 
VectorReadVarLenValueDex& dex) {
       builder->CreateAdd(loop_var_, GetSliceOffset(dex.OffsetsIdx()));
 
   // => offset_start = offsets[loop_var]
-  slot = CreateGEP(builder, offsets_slot_ref, offsets_slot_index);
-  llvm::Value* offset_start = CreateLoad(builder, slot, "offset_start");
+  slot = builder->CreateGEP(types->i32_type(), offsets_slot_ref, 
offsets_slot_index);
+  llvm::Value* offset_start =

Review Comment:
   Can we use `auto` here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to