Skip to content

Commit

Permalink
tiledb 2.4.2 (as 2.4.1 was skipped)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Oct 8, 2021
1 parent df2bcca commit f17a9e9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
19 changes: 13 additions & 6 deletions include/tiledb/arrow_io_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ BufferInfo ArrowExporter::buffer_info(const std::string& name) {
uint8_t offsets_elem_nbytes =
ctx_->config().get("sm.var_offsets.bitsize") == "32" ? 4 : 8;

bool is_var = (result_elt_iter->second.first != 0);
bool is_var = typeinfo.cell_val_num == TILEDB_VAR_NUM;

// NOTE: result sizes are in bytes
if (is_var) {
Expand Down Expand Up @@ -758,12 +758,19 @@ void ArrowExporter::export_(
}
cpp_schema->export_ptr(schema);

size_t elem_num = 0;
if (bufferinfo.is_var) {
// adjust for offset unless empty result
elem_num = (bufferinfo.data_num == 0) ? 0 : bufferinfo.offsets_num - 1;
} else {
elem_num = bufferinfo.data_num;
}

auto cpp_arrow_array = new CPPArrowArray(
(bufferinfo.is_var ? bufferinfo.offsets_num - 1 :
bufferinfo.data_num), // elem_num
0, // null_num
0, // offset
{}, // children
elem_num, // elem_num
0, // null_num
0, // offset
{}, // children
buffers);
cpp_arrow_array->export_ptr(array);
}
Expand Down
2 changes: 1 addition & 1 deletion include/tiledb/attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ class Attribute {
*
* @return Whether the attribute is nullable.
*/
bool nullable() {
bool nullable() const {
auto& ctx = ctx_.get();
uint8_t nullable;
ctx.handle_error(
Expand Down
2 changes: 0 additions & 2 deletions include/tiledb/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,6 @@ class Query {
ctx.handle_error(tiledb_query_get_offsets_buffer(
ctx.ptr().get(), query_.get(), name.c_str(), offsets, &offsets_nbytes));

assert(*offsets_nbytes % sizeof(uint64_t) == 0);

*offsets_nelements = (*offsets_nbytes) / sizeof(uint64_t);

return *this;
Expand Down
2 changes: 1 addition & 1 deletion include/tiledb/tiledb_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@

#define TILEDB_VERSION_MAJOR 2
#define TILEDB_VERSION_MINOR 4
#define TILEDB_VERSION_PATCH 0
#define TILEDB_VERSION_PATCH 2
Binary file modified lib/i386/libtiledbstatic.a
Binary file not shown.
Binary file modified lib/x64-ucrt/libtiledbstatic.a
Binary file not shown.
Binary file modified lib/x64/libtiledbstatic.a
Binary file not shown.

0 comments on commit f17a9e9

Please sign in to comment.