diff --git a/src/duckdb/src/function/table/version/pragma_version.cpp b/src/duckdb/src/function/table/version/pragma_version.cpp index d71a2b8e0..d5a1641f4 100644 --- a/src/duckdb/src/function/table/version/pragma_version.cpp +++ b/src/duckdb/src/function/table/version/pragma_version.cpp @@ -1,5 +1,5 @@ #ifndef DUCKDB_PATCH_VERSION -#define DUCKDB_PATCH_VERSION "3" +#define DUCKDB_PATCH_VERSION "4-dev6" #endif #ifndef DUCKDB_MINOR_VERSION #define DUCKDB_MINOR_VERSION 4 @@ -8,10 +8,10 @@ #define DUCKDB_MAJOR_VERSION 1 #endif #ifndef DUCKDB_VERSION -#define DUCKDB_VERSION "v1.4.3" +#define DUCKDB_VERSION "v1.4.4-dev6" #endif #ifndef DUCKDB_SOURCE_ID -#define DUCKDB_SOURCE_ID "d1dc88f950" +#define DUCKDB_SOURCE_ID "e92f41065f" #endif #include "duckdb/function/table/system_functions.hpp" #include "duckdb/main/database.hpp" diff --git a/src/duckdb/src/include/duckdb/common/operator/integer_cast_operator.hpp b/src/duckdb/src/include/duckdb/common/operator/integer_cast_operator.hpp index 8bf694c42..ccaef767c 100644 --- a/src/duckdb/src/include/duckdb/common/operator/integer_cast_operator.hpp +++ b/src/duckdb/src/include/duckdb/common/operator/integer_cast_operator.hpp @@ -103,9 +103,12 @@ struct IntegerDecimalCastOperation : IntegerCastOperation { int16_t e = exponent; // Negative Exponent if (e < 0) { - while (state.result != 0 && e++ < 0) { + while (e++ < 0) { state.decimal = state.result % 10; state.result /= 10; + if (state.result == 0 && state.decimal == 0) { + break; + } } if (state.decimal < 0) { state.decimal = -state.decimal; diff --git a/src/duckdb/src/storage/compression/numeric_constant.cpp b/src/duckdb/src/storage/compression/numeric_constant.cpp index 2407eb4df..1f2f73b26 100644 --- a/src/duckdb/src/storage/compression/numeric_constant.cpp +++ b/src/duckdb/src/storage/compression/numeric_constant.cpp @@ -156,7 +156,8 @@ void FiltersNullValues(const LogicalType &type, const TableFilter &filter, bool auto &expr_filter = filter.Cast(); auto &state = filter_state.Cast(); Value val(type); - filters_nulls = expr_filter.EvaluateWithConstant(state.executor, val); + //! If the expression evaluates to true, containing only a NULL vector, it *must* be an IS NULL filter + filters_nulls = !expr_filter.EvaluateWithConstant(state.executor, val); filters_valid_values = false; break; } diff --git a/src/duckdb/src/storage/table/column_segment.cpp b/src/duckdb/src/storage/table/column_segment.cpp index f7fcc25b3..347463fbe 100644 --- a/src/duckdb/src/storage/table/column_segment.cpp +++ b/src/duckdb/src/storage/table/column_segment.cpp @@ -242,9 +242,7 @@ void ColumnSegment::ConvertToPersistent(QueryContext context, optional_ptr