duckdb 0.3.3-dev286.0 → 0.3.3-dev288.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-dev286.0",
4
+ "version": "0.3.3-dev288.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -81074,6 +81074,21 @@ static void ExecuteMakeDate(DataChunk &input, ExpressionState &state, Vector &re
81074
81074
  MakeDateOperator::Operation<T, T, T, date_t>);
81075
81075
  }
81076
81076
 
81077
+ template <typename T>
81078
+ static void ExecuteStructMakeDate(DataChunk &input, ExpressionState &state, Vector &result) {
81079
+ // this should be guaranteed by the binder
81080
+ D_ASSERT(input.ColumnCount() == 1);
81081
+ auto &vec = input.data[0];
81082
+
81083
+ auto &children = StructVector::GetEntries(vec);
81084
+ D_ASSERT(children.size() == 3);
81085
+ auto &yyyy = *children[0];
81086
+ auto &mm = *children[1];
81087
+ auto &dd = *children[2];
81088
+
81089
+ TernaryExecutor::Execute<T, T, T, date_t>(yyyy, mm, dd, result, input.size(), Date::FromDate);
81090
+ }
81091
+
81077
81092
  struct MakeTimeOperator {
81078
81093
  template <typename HH, typename MM, typename SS, typename RESULT_TYPE>
81079
81094
  static RESULT_TYPE Operation(HH hh, MM mm, SS ss) {
@@ -81115,6 +81130,11 @@ void MakeDateFun::RegisterFunction(BuiltinFunctions &set) {
81115
81130
  ScalarFunctionSet make_date("make_date");
81116
81131
  make_date.AddFunction(ScalarFunction({LogicalType::BIGINT, LogicalType::BIGINT, LogicalType::BIGINT},
81117
81132
  LogicalType::DATE, ExecuteMakeDate<int64_t>));
81133
+
81134
+ child_list_t<LogicalType> make_date_children {
81135
+ {"year", LogicalType::BIGINT}, {"month", LogicalType::BIGINT}, {"day", LogicalType::BIGINT}};
81136
+ make_date.AddFunction(
81137
+ ScalarFunction({LogicalType::STRUCT(make_date_children)}, LogicalType::DATE, ExecuteStructMakeDate<int64_t>));
81118
81138
  set.AddFunction(make_date);
81119
81139
 
81120
81140
  ScalarFunctionSet make_time("make_time");
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 "7813e6620"
15
- #define DUCKDB_VERSION "v0.3.3-dev286"
14
+ #define DUCKDB_SOURCE_ID "4025edb3c"
15
+ #define DUCKDB_VERSION "v0.3.3-dev288"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //