Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions cpp/arcticdb/arrow/arrow_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,8 @@ std::shared_ptr<std::vector<sparrow::record_batch>> segment_to_arrow_data(Segmen
}

DataType arcticdb_type_from_arrow_array(const sparrow::array& array) {
// Remove const-cast once https://github.com/man-group/sparrow/issues/587 is released
// Remove use of get_arrow_array completely when https://github.com/man-group/sparrow/issues/588 is released
schema::check<ErrorCode::E_UNSUPPORTED_COLUMN_TYPE>(
sparrow::get_arrow_array(const_cast<sparrow::array&>(array))->dictionary == nullptr,
"Dictionary-encoded Arrow data unsupported"
!array.dictionary().has_value(), "Dictionary-encoded Arrow data unsupported"
);
switch (array.data_type()) {
case sparrow::data_type::BOOL:
Expand Down Expand Up @@ -364,9 +361,8 @@ std::pair<SegmentInMemory, std::optional<size_t>> arrow_data_to_segment(
const auto& data_type = data_types[idx];
const auto& array = record_batch->get_column(idx);
auto [arrow_array, arrow_schema] = sparrow::get_arrow_structures(array);
// Remove use of arrow_array here when https://github.com/man-group/sparrow/issues/589 is released
schema::check<ErrorCode::E_UNSUPPORTED_COLUMN_TYPE>(
arrow_array->null_count == 0,
array.null_count() == 0,
"Column '{}' contains null values, which are not currently supported",
record_batch->names()[idx]
);
Expand All @@ -382,11 +378,10 @@ std::pair<SegmentInMemory, std::optional<size_t>> arrow_data_to_segment(
column.buffer() = ChunkedBuffer::presized(total_rows);
}
packed_bits_to_buffer(
data, array.size(), arrow_array->offset, column.buffer().bytes_at(start_row, array.size())
data, array.size(), array.offset(), column.buffer().bytes_at(start_row, array.size())
);
} else { // Numeric and string types
// Remove use of arrow_array here when https://github.com/man-group/sparrow/issues/589 is released
data += arrow_array->offset * get_type_size(data_type);
data += array.offset() * get_type_size(data_type);
// For string columns, we deliberately omit the last value from the offsets buffer to keep our indexing
// into the column's ChunkedBuffer accurate. See corresponding comment in
// WriteToSegmentTask::slice_column
Expand Down
2 changes: 1 addition & 1 deletion cpp/vcpkg
Submodule vcpkg updated 2178 files
2 changes: 1 addition & 1 deletion cpp/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
],
"overrides": [
{ "name": "openssl", "version-string": "3.3.0" },
{ "name": "arcticdb-sparrow", "version": "1.1.0" },
{ "name": "arcticdb-sparrow", "version": "1.3.0" },
{ "name": "arrow", "version": "18.1.0" },
{ "name": "aws-sdk-cpp", "version": "1.11.474", "$note": "Update overlay json to upgrade; Upgrade to >=1.11.486 blocked by default integrity change" },
{ "name": "aws-crt-cpp", "version": "0.29.7" },
Expand Down
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
- openssl
- libcurl
- bitmagic
- sparrow-devel==1.2.0
- sparrow-devel==1.3.0
- spdlog
- azure-core-cpp
- azure-identity-cpp
Expand Down
Loading