Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Jun 18, 2024
1 parent 79b0ae4 commit a62c3a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion cpp/src/arrow/gpu/cuda_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,6 @@ TEST_F(TestCudaArrowIpc, WriteIpcList) {

ASSERT_EQ(values_device->data()->buffers[0]->address(),
payload.body_buffers[0]->address());

}

TEST_F(TestCudaArrowIpc, DictionaryWriteRead) {
Expand Down
18 changes: 9 additions & 9 deletions cpp/src/arrow/ipc/writer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ class RecordBatchSerializer {
template <typename T>
enable_if_base_binary<typename T::TypeClass, Status> Visit(const T& array) {
using offset_type = typename T::offset_type;

std::shared_ptr<Buffer> value_offsets;
RETURN_NOT_OK(GetZeroBasedValueOffsets<T>(array, &value_offsets));
auto data = array.value_data();
auto data = array.value_data();

int64_t total_data_bytes = 0;
if (value_offsets) {
offset_type first_offset_value, last_offset_value;
Expand Down Expand Up @@ -503,15 +503,15 @@ class RecordBatchSerializer {

offset_type values_offset = 0;
offset_type values_length = 0;
if (value_offsets) {
if (value_offsets) {
RETURN_NOT_OK(MemoryManager::CopyBufferSliceToCPU(
value_offsets, 0, sizeof(offset_type),
reinterpret_cast<uint8_t*>(&values_offset)));
value_offsets, 0, sizeof(offset_type),
reinterpret_cast<uint8_t*>(&values_offset)));
offset_type last_values_offset = 0;
RETURN_NOT_OK(MemoryManager::CopyBufferSliceToCPU(
value_offsets, array.length() * sizeof(offset_type), sizeof(offset_type),
reinterpret_cast<uint8_t*>(&last_values_offset)));
value_offsets, array.length() * sizeof(offset_type), sizeof(offset_type),
reinterpret_cast<uint8_t*>(&last_values_offset)));

values_length = last_values_offset - values_offset;
}

Expand Down

0 comments on commit a62c3a2

Please sign in to comment.