Skip to content

Commit

Permalink
Fix backwards compatibility tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
KiterLuc committed Jul 14, 2023
1 parent 6f111f5 commit 5e509ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions tiledb/sm/enums/datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ inline bool datatype_is_string(Datatype type) {
/** Returns true if the input datatype is an integer type. */
inline bool datatype_is_integer(Datatype type) {
return (
type == Datatype::BLOB || type == Datatype::BOOL ||
type == Datatype::INT8 || type == Datatype::UINT8 ||
type == Datatype::INT16 || type == Datatype::UINT16 ||
type == Datatype::INT32 || type == Datatype::UINT32 ||
type == Datatype::INT64 || type == Datatype::UINT64);
type == Datatype::BOOL || type == Datatype::INT8 ||
type == Datatype::UINT8 || type == Datatype::INT16 ||
type == Datatype::UINT16 || type == Datatype::INT32 ||
type == Datatype::UINT32 || type == Datatype::INT64 ||
type == Datatype::UINT64);
}

/**
Expand Down
6 changes: 4 additions & 2 deletions tiledb/sm/filter/bit_width_reduction_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ Status BitWidthReductionFilter::run_forward(
auto tile_type_size = static_cast<uint8_t>(datatype_size(tile_type));

// If bit width compression can't work, just return the input unmodified.
if (!datatype_is_integer(tile_type) || tile_type_size == 1) {
if ((!datatype_is_integer(tile_type) && tile_type != Datatype::BLOB) ||
tile_type_size == 1) {
RETURN_NOT_OK(output->append_view(input));
RETURN_NOT_OK(output_metadata->append_view(input_metadata));
return Status::Ok();
Expand Down Expand Up @@ -292,7 +293,8 @@ Status BitWidthReductionFilter::run_reverse(
auto tile_type_size = static_cast<uint8_t>(datatype_size(tile_type));

// If bit width compression wasn't applied, just return the input unmodified.
if (!datatype_is_integer(tile_type) || tile_type_size == 1) {
if ((!datatype_is_integer(tile_type) && tile_type != Datatype::BLOB) ||
tile_type_size == 1) {
RETURN_NOT_OK(output->append_view(input));
RETURN_NOT_OK(output_metadata->append_view(input_metadata));
return Status::Ok();
Expand Down
4 changes: 2 additions & 2 deletions tiledb/sm/filter/positive_delta_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Status PositiveDeltaFilter::run_forward(
auto tile_type = tile.type();

// If encoding can't work, just return the input unmodified.
if (!datatype_is_integer(tile_type)) {
if (!datatype_is_integer(tile_type) && tile_type != Datatype::BLOB) {
RETURN_NOT_OK(output->append_view(input));
RETURN_NOT_OK(output_metadata->append_view(input_metadata));
return Status::Ok();
Expand Down Expand Up @@ -250,7 +250,7 @@ Status PositiveDeltaFilter::run_reverse(
auto tile_type = tile.type();

// If encoding wasn't applied, just return the input unmodified.
if (!datatype_is_integer(tile_type)) {
if (!datatype_is_integer(tile_type) && tile_type != Datatype::BLOB) {
RETURN_NOT_OK(output->append_view(input));
RETURN_NOT_OK(output_metadata->append_view(input_metadata));
return Status::Ok();
Expand Down

0 comments on commit 5e509ba

Please sign in to comment.