duckdb 0.3.3-dev1422.0 → 0.3.3-dev1425.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +8 -9
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +36251 -36251
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -129455,6 +129455,7 @@ unique_ptr<BaseStatistics> StatisticsPropagator::PropagateExpression(BoundAggreg
|
|
|
129455
129455
|
|
|
129456
129456
|
|
|
129457
129457
|
|
|
129458
|
+
|
|
129458
129459
|
namespace duckdb {
|
|
129459
129460
|
|
|
129460
129461
|
unique_ptr<Expression> CastHugeintToSmallestType(unique_ptr<Expression> expr, NumericStatistics &num_stats) {
|
|
@@ -129517,23 +129518,21 @@ unique_ptr<Expression> TemplatedCastToSmallestType(unique_ptr<Expression> expr,
|
|
|
129517
129518
|
return expr;
|
|
129518
129519
|
}
|
|
129519
129520
|
|
|
129520
|
-
//
|
|
129521
|
-
|
|
129522
|
-
|
|
129521
|
+
// Compute range, cast to unsigned to prevent comparing signed with unsigned
|
|
129522
|
+
T signed_range;
|
|
129523
|
+
if (!TrySubtractOperator::Operation(signed_min_val, signed_max_val, signed_range)) {
|
|
129524
|
+
// overflow in subtraction: cannot do any simplification
|
|
129523
129525
|
return expr;
|
|
129524
129526
|
}
|
|
129525
|
-
|
|
129526
|
-
// Compute range, cast to unsigned to prevent comparing signed with unsigned
|
|
129527
|
-
auto signed_range = signed_max_val - signed_min_val;
|
|
129528
129527
|
auto range = static_cast<typename std::make_unsigned<decltype(signed_range)>::type>(signed_range);
|
|
129529
129528
|
|
|
129530
129529
|
// Check if this range fits in a smaller type
|
|
129531
129530
|
LogicalType cast_type;
|
|
129532
|
-
if (range < NumericLimits<uint8_t
|
|
129531
|
+
if (range < NumericLimits<uint8_t>::Maximum()) {
|
|
129533
129532
|
cast_type = LogicalType::UTINYINT;
|
|
129534
|
-
} else if (sizeof(T) > sizeof(uint16_t) && range < NumericLimits<uint16_t
|
|
129533
|
+
} else if (sizeof(T) > sizeof(uint16_t) && range < NumericLimits<uint16_t>::Maximum()) {
|
|
129535
129534
|
cast_type = LogicalType::USMALLINT;
|
|
129536
|
-
} else if (sizeof(T) > sizeof(uint32_t) && range < NumericLimits<uint32_t
|
|
129535
|
+
} else if (sizeof(T) > sizeof(uint32_t) && range < NumericLimits<uint32_t>::Maximum()) {
|
|
129537
129536
|
cast_type = LogicalType::UINTEGER;
|
|
129538
129537
|
} else {
|
|
129539
129538
|
return expr;
|
package/src/duckdb.hpp
CHANGED
|
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
11
11
|
#pragma once
|
|
12
12
|
#define DUCKDB_AMALGAMATION 1
|
|
13
13
|
#define DUCKDB_AMALGAMATION_EXTENDED 1
|
|
14
|
-
#define DUCKDB_SOURCE_ID "
|
|
15
|
-
#define DUCKDB_VERSION "v0.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "f9fcdc7d0"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev1425"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|