Skip to content
24 changes: 12 additions & 12 deletions r/src/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ int32_t ListArray__value_length(const std::shared_ptr<arrow::ListArray>& array,
}

// [[arrow::export]]
int64_t LargeListArray__value_length(const std::shared_ptr<arrow::LargeListArray>& array,
int64_t i) {
return array->value_length(i);
r_vec_size LargeListArray__value_length(
const std::shared_ptr<arrow::LargeListArray>& array, int64_t i) {
return r_vec_size(array->value_length(i));
}

// [[arrow::export]]
int64_t FixedSizeListArray__value_length(
r_vec_size FixedSizeListArray__value_length(
const std::shared_ptr<arrow::FixedSizeListArray>& array, int64_t i) {
return array->value_length(i);
return r_vec_size(array->value_length(i));
}

// [[arrow::export]]
Expand All @@ -262,15 +262,15 @@ int32_t ListArray__value_offset(const std::shared_ptr<arrow::ListArray>& array,
}

// [[arrow::export]]
int64_t LargeListArray__value_offset(const std::shared_ptr<arrow::LargeListArray>& array,
int64_t i) {
return array->value_offset(i);
r_vec_size LargeListArray__value_offset(
const std::shared_ptr<arrow::LargeListArray>& array, int64_t i) {
return r_vec_size(array->value_offset(i));
}

// [[arrow::export]]
int64_t FixedSizeListArray__value_offset(
r_vec_size FixedSizeListArray__value_offset(
const std::shared_ptr<arrow::FixedSizeListArray>& array, int64_t i) {
return array->value_offset(i);
return r_vec_size(array->value_offset(i));
}

// [[arrow::export]]
Expand Down Expand Up @@ -319,8 +319,8 @@ bool Array__Same(const std::shared_ptr<arrow::Array>& x,
}

// [[arrow::export]]
int64_t Array__ReferencedBufferSize(const std::shared_ptr<arrow::Array>& x) {
return ValueOrStop(arrow::util::ReferencedBufferSize(*x));
r_vec_size Array__ReferencedBufferSize(const std::shared_ptr<arrow::Array>& x) {
return r_vec_size(ValueOrStop(arrow::util::ReferencedBufferSize(*x)));
}

// [[arrow::export]]
Expand Down
44 changes: 22 additions & 22 deletions r/src/arrowExports.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions r/src/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ void Buffer__ZeroPadding(const std::shared_ptr<arrow::Buffer>& buffer) {
}

// [[arrow::export]]
int64_t Buffer__capacity(const std::shared_ptr<arrow::Buffer>& buffer) {
return buffer->capacity();
r_vec_size Buffer__capacity(const std::shared_ptr<arrow::Buffer>& buffer) {
return r_vec_size(buffer->capacity());
}

// [[arrow::export]]
int64_t Buffer__size(const std::shared_ptr<arrow::Buffer>& buffer) {
return buffer->size();
r_vec_size Buffer__size(const std::shared_ptr<arrow::Buffer>& buffer) {
return r_vec_size(buffer->size());
}

// [[arrow::export]]
Expand Down
4 changes: 2 additions & 2 deletions r/src/chunkedarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ std::shared_ptr<arrow::ChunkedArray> ChunkedArray__from_list(cpp11::list chunks,
}

// [[arrow::export]]
int64_t ChunkedArray__ReferencedBufferSize(
r_vec_size ChunkedArray__ReferencedBufferSize(
const std::shared_ptr<arrow::ChunkedArray>& chunked_array) {
return ValueOrStop(arrow::util::ReferencedBufferSize(*chunked_array));
return r_vec_size(ValueOrStop(arrow::util::ReferencedBufferSize(*chunked_array)));
}
4 changes: 2 additions & 2 deletions r/src/dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ std::shared_ptr<arrow::Table> dataset___Scanner__TakeRows(
}

// [[dataset::export]]
int64_t dataset___Scanner__CountRows(const std::shared_ptr<ds::Scanner>& scanner) {
return ValueOrStop(scanner->CountRows());
r_vec_size dataset___Scanner__CountRows(const std::shared_ptr<ds::Scanner>& scanner) {
return r_vec_size(ValueOrStop(scanner->CountRows()));
Comment thread
thisisnic marked this conversation as resolved.
}

#endif
4 changes: 3 additions & 1 deletion r/src/filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ void fs___FileInfo__set_path(const std::shared_ptr<fs::FileInfo>& x,
}

// [[arrow::export]]
int64_t fs___FileInfo__size(const std::shared_ptr<fs::FileInfo>& x) { return x->size(); }
r_vec_size fs___FileInfo__size(const std::shared_ptr<fs::FileInfo>& x) {
return r_vec_size(x->size());
}

// [[arrow::export]]
void fs___FileInfo__set_size(const std::shared_ptr<fs::FileInfo>& x, int64_t size) {
Expand Down
21 changes: 11 additions & 10 deletions r/src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ void io___OutputStream__Close(const std::shared_ptr<arrow::io::OutputStream>& x)
// ------ arrow::io::RandomAccessFile

// [[arrow::export]]
int64_t io___RandomAccessFile__GetSize(
r_vec_size io___RandomAccessFile__GetSize(
const std::shared_ptr<arrow::io::RandomAccessFile>& x) {
return ValueOrStop(x->GetSize());
return r_vec_size(ValueOrStop(x->GetSize()));
}

// [[arrow::export]]
Expand All @@ -69,9 +69,9 @@ void io___RandomAccessFile__Seek(const std::shared_ptr<arrow::io::RandomAccessFi
}

// [[arrow::export]]
int64_t io___RandomAccessFile__Tell(
r_vec_size io___RandomAccessFile__Tell(
const std::shared_ptr<arrow::io::RandomAccessFile>& x) {
return ValueOrStop(x->Tell());
return r_vec_size(ValueOrStop(x->Tell()));
}

// [[arrow::export]]
Expand Down Expand Up @@ -161,8 +161,9 @@ void io___Writable__write(const std::shared_ptr<arrow::io::Writable>& stream,
// ------- arrow::io::OutputStream

// [[arrow::export]]
int64_t io___OutputStream__Tell(const std::shared_ptr<arrow::io::OutputStream>& stream) {
return ValueOrStop(stream->Tell());
r_vec_size io___OutputStream__Tell(
const std::shared_ptr<arrow::io::OutputStream>& stream) {
return r_vec_size(ValueOrStop(stream->Tell()));
}

// ------ arrow::io::FileOutputStream
Expand All @@ -183,9 +184,9 @@ std::shared_ptr<arrow::io::BufferOutputStream> io___BufferOutputStream__Create(
}

// [[arrow::export]]
int64_t io___BufferOutputStream__capacity(
r_vec_size io___BufferOutputStream__capacity(
const std::shared_ptr<arrow::io::BufferOutputStream>& stream) {
return stream->capacity();
return r_vec_size(stream->capacity());
}

// [[arrow::export]]
Expand All @@ -195,9 +196,9 @@ std::shared_ptr<arrow::Buffer> io___BufferOutputStream__Finish(
}

// [[arrow::export]]
int64_t io___BufferOutputStream__Tell(
r_vec_size io___BufferOutputStream__Tell(
const std::shared_ptr<arrow::io::BufferOutputStream>& stream) {
return ValueOrStop(stream->Tell());
return r_vec_size(ValueOrStop(stream->Tell()));
}

// [[arrow::export]]
Expand Down
9 changes: 5 additions & 4 deletions r/src/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
#include <arrow/ipc/writer.h>

// [[arrow::export]]
int64_t ipc___Message__body_length(const std::unique_ptr<arrow::ipc::Message>& message) {
return message->body_length();
r_vec_size ipc___Message__body_length(
const std::unique_ptr<arrow::ipc::Message>& message) {
return r_vec_size(message->body_length());
}

// [[arrow::export]]
Expand All @@ -38,8 +39,8 @@ std::shared_ptr<arrow::Buffer> ipc___Message__body(
}

// [[arrow::export]]
int64_t ipc___Message__Verify(const std::unique_ptr<arrow::ipc::Message>& message) {
return message->Verify();
r_vec_size ipc___Message__Verify(const std::unique_ptr<arrow::ipc::Message>& message) {
return r_vec_size(message->Verify());
}

// [[arrow::export]]
Expand Down
4 changes: 2 additions & 2 deletions r/src/parquet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ std::shared_ptr<arrow::Table> parquet___arrow___FileReader__ReadRowGroups2(
}

// [[parquet::export]]
int64_t parquet___arrow___FileReader__num_rows(
r_vec_size parquet___arrow___FileReader__num_rows(
const std::shared_ptr<parquet::arrow::FileReader>& reader) {
return reader->parquet_reader()->metadata()->num_rows();
return r_vec_size(reader->parquet_reader()->metadata()->num_rows());
}

// [[parquet::export]]
Expand Down
Loading