duckdb 0.3.3-dev1418.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.3.3-dev1418.0",
4
+ "version": "0.3.3-dev1425.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -91252,14 +91252,11 @@ struct NextSequenceValueOperator {
91252
91252
  bool overflow = !TryAddOperator::Operation(seq->counter, seq->increment, seq->counter);
91253
91253
  if (seq->cycle) {
91254
91254
  if (overflow) {
91255
- throw SequenceException("overflow in sequence");
91256
- }
91257
- if (result < seq->min_value) {
91258
- result = seq->max_value;
91259
- seq->counter = seq->max_value + seq->increment;
91260
- } else if (result > seq->max_value) {
91261
- result = seq->min_value;
91262
- seq->counter = seq->min_value + seq->increment;
91255
+ seq->counter = seq->increment < 0 ? seq->max_value : seq->min_value;
91256
+ } else if (seq->counter < seq->min_value) {
91257
+ seq->counter = seq->max_value;
91258
+ } else if (seq->counter > seq->max_value) {
91259
+ seq->counter = seq->min_value;
91263
91260
  }
91264
91261
  } else {
91265
91262
  if (result < seq->min_value || (overflow && seq->increment < 0)) {
@@ -129458,6 +129455,7 @@ unique_ptr<BaseStatistics> StatisticsPropagator::PropagateExpression(BoundAggreg
129458
129455
 
129459
129456
 
129460
129457
 
129458
+
129461
129459
  namespace duckdb {
129462
129460
 
129463
129461
  unique_ptr<Expression> CastHugeintToSmallestType(unique_ptr<Expression> expr, NumericStatistics &num_stats) {
@@ -129520,23 +129518,21 @@ unique_ptr<Expression> TemplatedCastToSmallestType(unique_ptr<Expression> expr,
129520
129518
  return expr;
129521
129519
  }
129522
129520
 
129523
- // Prevent signed integer overflow - we can't range map these
129524
- if (std::is_signed<T>() && signed_min_val < -((T)1 << (sizeof(T) * 8 - 2)) &&
129525
- signed_max_val > ((T)1 << (sizeof(T) * 8 - 2))) {
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
129526
129525
  return expr;
129527
129526
  }
129528
-
129529
- // Compute range, cast to unsigned to prevent comparing signed with unsigned
129530
- auto signed_range = signed_max_val - signed_min_val;
129531
129527
  auto range = static_cast<typename std::make_unsigned<decltype(signed_range)>::type>(signed_range);
129532
129528
 
129533
129529
  // Check if this range fits in a smaller type
129534
129530
  LogicalType cast_type;
129535
- if (range < NumericLimits<uint8_t>().Maximum()) {
129531
+ if (range < NumericLimits<uint8_t>::Maximum()) {
129536
129532
  cast_type = LogicalType::UTINYINT;
129537
- } else if (sizeof(T) > sizeof(uint16_t) && range < NumericLimits<uint16_t>().Maximum()) {
129533
+ } else if (sizeof(T) > sizeof(uint16_t) && range < NumericLimits<uint16_t>::Maximum()) {
129538
129534
  cast_type = LogicalType::USMALLINT;
129539
- } else if (sizeof(T) > sizeof(uint32_t) && range < NumericLimits<uint32_t>().Maximum()) {
129535
+ } else if (sizeof(T) > sizeof(uint32_t) && range < NumericLimits<uint32_t>::Maximum()) {
129540
129536
  cast_type = LogicalType::UINTEGER;
129541
129537
  } else {
129542
129538
  return expr;
@@ -132117,6 +132113,9 @@ bool Pipeline::GetProgressInternal(ClientContext &context, PhysicalOperator *op,
132117
132113
  if (!GetProgressInternal(context, op_child.get(), child_percentage)) {
132118
132114
  return false;
132119
132115
  }
132116
+ if (!Value::DoubleIsFinite(child_percentage)) {
132117
+ return false;
132118
+ }
132120
132119
  progress.push_back(child_percentage);
132121
132120
  cardinality.push_back(op_child->estimated_cardinality);
132122
132121
  total_cardinality += op_child->estimated_cardinality;
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 "a5b6279ed"
15
- #define DUCKDB_VERSION "v0.3.3-dev1418"
14
+ #define DUCKDB_SOURCE_ID "f9fcdc7d0"
15
+ #define DUCKDB_VERSION "v0.3.3-dev1425"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //