duckdb 0.3.5-dev960.0 → 0.3.5-dev966.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.5-dev960.0",
4
+ "version": "0.3.5-dev966.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -41350,26 +41350,23 @@ hugeint_t hugeint_t::operator-() const {
41350
41350
  }
41351
41351
 
41352
41352
  hugeint_t hugeint_t::operator>>(const hugeint_t &rhs) const {
41353
- if (upper < 0) {
41354
- return hugeint_t(0);
41355
- }
41356
41353
  hugeint_t result;
41357
41354
  uint64_t shift = rhs.lower;
41358
41355
  if (rhs.upper != 0 || shift >= 128) {
41359
41356
  return hugeint_t(0);
41360
- } else if (shift == 64) {
41361
- result.upper = 0;
41362
- result.lower = upper;
41363
41357
  } else if (shift == 0) {
41364
41358
  return *this;
41359
+ } else if (shift == 64) {
41360
+ result.upper = (upper < 0) ? -1 : 0;
41361
+ result.lower = upper;
41365
41362
  } else if (shift < 64) {
41366
- // perform upper shift in unsigned integer, and mask away the most significant bit
41367
- result.lower = (uint64_t(upper) << (64 - shift)) + (lower >> shift);
41368
- result.upper = uint64_t(upper) >> shift;
41363
+ // perform lower shift in unsigned integer, and mask away the most significant bit
41364
+ result.lower = (uint64_t(upper) << (64 - shift)) | (lower >> shift);
41365
+ result.upper = upper >> shift;
41369
41366
  } else {
41370
41367
  D_ASSERT(shift < 128);
41371
- result.lower = uint64_t(upper) >> (shift - 64);
41372
- result.upper = 0;
41368
+ result.lower = upper >> (shift - 64);
41369
+ result.upper = (upper < 0) ? -1 : 0;
41373
41370
  }
41374
41371
  return result;
41375
41372
  }
@@ -97512,12 +97509,28 @@ struct IsInfiniteOperator {
97512
97509
  }
97513
97510
  };
97514
97511
 
97512
+ template <>
97513
+ bool IsInfiniteOperator::Operation(date_t input) {
97514
+ return !Value::IsFinite(input);
97515
+ }
97516
+
97517
+ template <>
97518
+ bool IsInfiniteOperator::Operation(timestamp_t input) {
97519
+ return !Value::IsFinite(input);
97520
+ }
97521
+
97515
97522
  void IsInfiniteFun::RegisterFunction(BuiltinFunctions &set) {
97516
97523
  ScalarFunctionSet funcs("isinf");
97517
97524
  funcs.AddFunction(ScalarFunction({LogicalType::FLOAT}, LogicalType::BOOLEAN,
97518
97525
  ScalarFunction::UnaryFunction<float, bool, IsInfiniteOperator>));
97519
97526
  funcs.AddFunction(ScalarFunction({LogicalType::DOUBLE}, LogicalType::BOOLEAN,
97520
97527
  ScalarFunction::UnaryFunction<double, bool, IsInfiniteOperator>));
97528
+ funcs.AddFunction(ScalarFunction({LogicalType::DATE}, LogicalType::BOOLEAN,
97529
+ ScalarFunction::UnaryFunction<date_t, bool, IsInfiniteOperator>));
97530
+ funcs.AddFunction(ScalarFunction({LogicalType::TIMESTAMP}, LogicalType::BOOLEAN,
97531
+ ScalarFunction::UnaryFunction<timestamp_t, bool, IsInfiniteOperator>));
97532
+ funcs.AddFunction(ScalarFunction({LogicalType::TIMESTAMP_TZ}, LogicalType::BOOLEAN,
97533
+ ScalarFunction::UnaryFunction<timestamp_t, bool, IsInfiniteOperator>));
97521
97534
  set.AddFunction(funcs);
97522
97535
  }
97523
97536
 
@@ -97537,6 +97550,12 @@ void IsFiniteFun::RegisterFunction(BuiltinFunctions &set) {
97537
97550
  ScalarFunction::UnaryFunction<float, bool, IsFiniteOperator>));
97538
97551
  funcs.AddFunction(ScalarFunction({LogicalType::DOUBLE}, LogicalType::BOOLEAN,
97539
97552
  ScalarFunction::UnaryFunction<double, bool, IsFiniteOperator>));
97553
+ funcs.AddFunction(ScalarFunction({LogicalType::DATE}, LogicalType::BOOLEAN,
97554
+ ScalarFunction::UnaryFunction<date_t, bool, IsFiniteOperator>));
97555
+ funcs.AddFunction(ScalarFunction({LogicalType::TIMESTAMP}, LogicalType::BOOLEAN,
97556
+ ScalarFunction::UnaryFunction<timestamp_t, bool, IsFiniteOperator>));
97557
+ funcs.AddFunction(ScalarFunction({LogicalType::TIMESTAMP_TZ}, LogicalType::BOOLEAN,
97558
+ ScalarFunction::UnaryFunction<timestamp_t, bool, IsFiniteOperator>));
97540
97559
  set.AddFunction(funcs);
97541
97560
  }
97542
97561
 
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 "1c814b890"
15
- #define DUCKDB_VERSION "v0.3.5-dev960"
14
+ #define DUCKDB_SOURCE_ID "466fb1f9d"
15
+ #define DUCKDB_VERSION "v0.3.5-dev966"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //