duckdb 0.6.2-dev1095.0 → 0.6.2-dev1097.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
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.6.2-dev1095.0",
5
+ "version": "0.6.2-dev1097.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
@@ -846,6 +846,25 @@ void IsNanFun::RegisterFunction(BuiltinFunctions &set) {
846
846
  set.AddFunction(funcs);
847
847
  }
848
848
 
849
+ //===--------------------------------------------------------------------===//
850
+ // signbit
851
+ //===--------------------------------------------------------------------===//
852
+ struct SignBitOperator {
853
+ template <class TA, class TR>
854
+ static inline TR Operation(TA input) {
855
+ return std::signbit(input);
856
+ }
857
+ };
858
+
859
+ void SignBitFun::RegisterFunction(BuiltinFunctions &set) {
860
+ ScalarFunctionSet funcs("signbit");
861
+ funcs.AddFunction(ScalarFunction({LogicalType::FLOAT}, LogicalType::BOOLEAN,
862
+ ScalarFunction::UnaryFunction<float, bool, SignBitOperator>));
863
+ funcs.AddFunction(ScalarFunction({LogicalType::DOUBLE}, LogicalType::BOOLEAN,
864
+ ScalarFunction::UnaryFunction<double, bool, SignBitOperator>));
865
+ set.AddFunction(funcs);
866
+ }
867
+
849
868
  //===--------------------------------------------------------------------===//
850
869
  // isinf
851
870
  //===--------------------------------------------------------------------===//
@@ -38,6 +38,7 @@ void BuiltinFunctions::RegisterMathFunctions() {
38
38
  Register<EvenFun>();
39
39
 
40
40
  Register<IsNanFun>();
41
+ Register<SignBitFun>();
41
42
  Register<IsInfiniteFun>();
42
43
  Register<IsFiniteFun>();
43
44
  }
@@ -1,8 +1,8 @@
1
1
  #ifndef DUCKDB_VERSION
2
- #define DUCKDB_VERSION "0.6.2-dev1095"
2
+ #define DUCKDB_VERSION "0.6.2-dev1097"
3
3
  #endif
4
4
  #ifndef DUCKDB_SOURCE_ID
5
- #define DUCKDB_SOURCE_ID "c800542e23"
5
+ #define DUCKDB_SOURCE_ID "9e64704159"
6
6
  #endif
7
7
  #include "duckdb/function/table/system_functions.hpp"
8
8
  #include "duckdb/main/database.hpp"
@@ -110,6 +110,10 @@ struct IsNanFun {
110
110
  static void RegisterFunction(BuiltinFunctions &set);
111
111
  };
112
112
 
113
+ struct SignBitFun {
114
+ static void RegisterFunction(BuiltinFunctions &set);
115
+ };
116
+
113
117
  struct IsInfiniteFun {
114
118
  static void RegisterFunction(BuiltinFunctions &set);
115
119
  };