duckdb 0.9.1-dev95.0 → 0.9.1

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.
Files changed (84) hide show
  1. package/.github/workflows/NodeJS.yml +250 -0
  2. package/Makefile +3 -9
  3. package/README.md +2 -2
  4. package/binding.gyp +8 -8
  5. package/package.json +4 -4
  6. package/scripts/install_node.sh +21 -0
  7. package/scripts/node_build.sh +40 -0
  8. package/scripts/node_build_win.sh +21 -0
  9. package/scripts/node_version.sh +33 -0
  10. package/src/duckdb/extension/icu/icu-makedate.cpp +1 -1
  11. package/src/duckdb/extension/icu/icu-strptime.cpp +0 -2
  12. package/src/duckdb/extension/icu/icu_extension.cpp +0 -1
  13. package/src/duckdb/extension/json/json_functions/json_create.cpp +27 -14
  14. package/src/duckdb/extension/json/json_functions/json_transform.cpp +26 -14
  15. package/src/duckdb/extension/json/json_functions.cpp +1 -10
  16. package/src/duckdb/extension/parquet/column_reader.cpp +26 -1
  17. package/src/duckdb/extension/parquet/column_writer.cpp +10 -1
  18. package/src/duckdb/extension/parquet/include/column_reader.hpp +2 -0
  19. package/src/duckdb/extension/parquet/include/parquet_bss_decoder.hpp +49 -0
  20. package/src/duckdb/extension/parquet/parquet_extension.cpp +3 -4
  21. package/src/duckdb/extension/parquet/parquet_timestamp.cpp +3 -4
  22. package/src/duckdb/src/common/arrow/appender/list_data.cpp +2 -2
  23. package/src/duckdb/src/common/arrow/appender/map_data.cpp +15 -10
  24. package/src/duckdb/src/common/arrow/appender/struct_data.cpp +2 -2
  25. package/src/duckdb/src/common/arrow/appender/union_data.cpp +2 -2
  26. package/src/duckdb/src/common/arrow/arrow_appender.cpp +26 -7
  27. package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +3 -3
  28. package/src/duckdb/src/common/exception.cpp +60 -84
  29. package/src/duckdb/src/common/preserved_error.cpp +20 -0
  30. package/src/duckdb/src/common/types/data_chunk.cpp +1 -1
  31. package/src/duckdb/src/execution/expression_executor/execute_reference.cpp +1 -1
  32. package/src/duckdb/src/execution/expression_executor_state.cpp +8 -2
  33. package/src/duckdb/src/execution/operator/csv_scanner/buffered_csv_reader.cpp +1 -1
  34. package/src/duckdb/src/execution/operator/csv_scanner/csv_state_machine_cache.cpp +2 -0
  35. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/csv_sniffer.cpp +5 -5
  36. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/dialect_detection.cpp +4 -4
  37. package/src/duckdb/src/execution/operator/csv_scanner/sniffer/type_replacement.cpp +2 -2
  38. package/src/duckdb/src/execution/operator/helper/physical_reset.cpp +1 -4
  39. package/src/duckdb/src/execution/operator/helper/physical_set.cpp +2 -4
  40. package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +4 -6
  41. package/src/duckdb/src/function/function_binder.cpp +1 -1
  42. package/src/duckdb/src/function/table/arrow_conversion.cpp +2 -1
  43. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  44. package/src/duckdb/src/include/duckdb/common/arrow/appender/append_data.hpp +4 -0
  45. package/src/duckdb/src/include/duckdb/common/arrow/appender/enum_data.hpp +3 -1
  46. package/src/duckdb/src/include/duckdb/common/arrow/arrow_appender.hpp +2 -1
  47. package/src/duckdb/src/include/duckdb/common/arrow/arrow_wrapper.hpp +3 -0
  48. package/src/duckdb/src/include/duckdb/common/exception.hpp +1 -0
  49. package/src/duckdb/src/include/duckdb/common/preserved_error.hpp +1 -3
  50. package/src/duckdb/src/include/duckdb/execution/expression_executor_state.hpp +1 -1
  51. package/src/duckdb/src/include/duckdb/execution/operator/scan/csv/base_csv_reader.hpp +0 -4
  52. package/src/duckdb/src/include/duckdb/execution/operator/scan/csv/csv_sniffer.hpp +10 -10
  53. package/src/duckdb/src/include/duckdb/function/replacement_scan.hpp +20 -0
  54. package/src/duckdb/src/include/duckdb/main/config.hpp +2 -0
  55. package/src/duckdb/src/include/duckdb/optimizer/filter_pushdown.hpp +2 -0
  56. package/src/duckdb/src/include/duckdb/planner/binder.hpp +1 -0
  57. package/src/duckdb/src/include/duckdb/planner/bound_parameter_map.hpp +3 -0
  58. package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +2 -2
  59. package/src/duckdb/src/main/capi/arrow-c.cpp +7 -4
  60. package/src/duckdb/src/main/config.cpp +14 -0
  61. package/src/duckdb/src/main/extension/extension_install.cpp +14 -12
  62. package/src/duckdb/src/optimizer/filter_pushdown.cpp +1 -0
  63. package/src/duckdb/src/optimizer/pushdown/pushdown_distinct.cpp +19 -0
  64. package/src/duckdb/src/parser/transform/statement/transform_copy.cpp +4 -2
  65. package/src/duckdb/src/parser/transform/statement/transform_create_sequence.cpp +10 -5
  66. package/src/duckdb/src/planner/binder/expression/bind_between_expression.cpp +5 -7
  67. package/src/duckdb/src/planner/binder/expression/bind_collate_expression.cpp +4 -2
  68. package/src/duckdb/src/planner/binder/expression/bind_comparison_expression.cpp +17 -14
  69. package/src/duckdb/src/planner/binder/query_node/bind_select_node.cpp +5 -12
  70. package/src/duckdb/src/planner/binder/statement/bind_create.cpp +15 -1
  71. package/src/duckdb/src/planner/bound_parameter_map.cpp +16 -5
  72. package/src/duckdb/src/planner/expression_binder/base_select_binder.cpp +2 -5
  73. package/src/duckdb/src/planner/planner.cpp +1 -1
  74. package/src/duckdb/src/transaction/duck_transaction_manager.cpp +13 -9
  75. package/src/duckdb/third_party/parquet/parquet_types.h +2 -1
  76. package/src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp +5 -5
  77. package/src/duckdb/ub_src_optimizer_pushdown.cpp +2 -0
  78. package/src/statement.cpp +4 -4
  79. package/test/arrow.test.ts +3 -1
  80. package/test/parquet.test.ts +1 -1
  81. package/test/userdata1.parquet +0 -0
  82. package/{configure → vendor} +1 -1
  83. package/{configure.py → vendor.py} +12 -1
  84. package/duckdb_extension_config.cmake +0 -10
@@ -18,20 +18,25 @@
18
18
 
19
19
  namespace duckdb {
20
20
 
21
- unique_ptr<Expression> ExpressionBinder::PushCollation(ClientContext &context, unique_ptr<Expression> source,
22
- const string &collation_p, bool equality_only) {
21
+ bool ExpressionBinder::PushCollation(ClientContext &context, unique_ptr<Expression> &source,
22
+ const LogicalType &sql_type, bool equality_only) {
23
+ if (sql_type.id() != LogicalTypeId::VARCHAR) {
24
+ // only VARCHAR columns require collation
25
+ return false;
26
+ }
23
27
  // replace default collation with system collation
28
+ auto str_collation = StringType::GetCollation(sql_type);
24
29
  string collation;
25
- if (collation_p.empty()) {
30
+ if (str_collation.empty()) {
26
31
  collation = DBConfig::GetConfig(context).options.collation;
27
32
  } else {
28
- collation = collation_p;
33
+ collation = str_collation;
29
34
  }
30
35
  collation = StringUtil::Lower(collation);
31
36
  // bind the collation
32
37
  if (collation.empty() || collation == "binary" || collation == "c" || collation == "posix") {
33
- // binary collation: just skip
34
- return source;
38
+ // no collation or binary collation: skip
39
+ return false;
35
40
  }
36
41
  auto &catalog = Catalog::GetSystemCatalog(context);
37
42
  auto splits = StringUtil::Split(StringUtil::Lower(collation), ".");
@@ -60,11 +65,12 @@ unique_ptr<Expression> ExpressionBinder::PushCollation(ClientContext &context, u
60
65
  auto function = function_binder.BindScalarFunction(collation_entry.function, std::move(children));
61
66
  source = std::move(function);
62
67
  }
63
- return source;
68
+ return true;
64
69
  }
65
70
 
66
71
  void ExpressionBinder::TestCollation(ClientContext &context, const string &collation) {
67
- PushCollation(context, make_uniq<BoundConstantExpression>(Value("")), collation);
72
+ auto expr = make_uniq_base<Expression, BoundConstantExpression>(Value(""));
73
+ PushCollation(context, expr, LogicalType::VARCHAR_COLLATION(collation));
68
74
  }
69
75
 
70
76
  LogicalType BoundComparisonExpression::BindComparison(LogicalType left_type, LogicalType right_type) {
@@ -134,12 +140,9 @@ BindResult ExpressionBinder::BindExpression(ComparisonExpression &expr, idx_t de
134
140
  right = BoundCastExpression::AddCastToType(context, std::move(right), input_type,
135
141
  input_type.id() == LogicalTypeId::ENUM);
136
142
 
137
- if (input_type.id() == LogicalTypeId::VARCHAR) {
138
- // handle collation
139
- auto collation = StringType::GetCollation(input_type);
140
- left = PushCollation(context, std::move(left), collation, expr.type == ExpressionType::COMPARE_EQUAL);
141
- right = PushCollation(context, std::move(right), collation, expr.type == ExpressionType::COMPARE_EQUAL);
142
- }
143
+ PushCollation(context, left, input_type, expr.type == ExpressionType::COMPARE_EQUAL);
144
+ PushCollation(context, right, input_type, expr.type == ExpressionType::COMPARE_EQUAL);
145
+
143
146
  // now create the bound comparison expression
144
147
  return BindResult(make_uniq<BoundComparisonExpression>(expr.type, std::move(left), std::move(right)));
145
148
  }
@@ -222,10 +222,7 @@ void Binder::BindModifierTypes(BoundQueryNode &result, const vector<LogicalType>
222
222
  for (auto &target_distinct : distinct.target_distincts) {
223
223
  auto &bound_colref = target_distinct->Cast<BoundColumnRefExpression>();
224
224
  const auto &sql_type = sql_types[bound_colref.binding.column_index];
225
- if (sql_type.id() == LogicalTypeId::VARCHAR) {
226
- target_distinct = ExpressionBinder::PushCollation(context, std::move(target_distinct),
227
- StringType::GetCollation(sql_type), true);
228
- }
225
+ ExpressionBinder::PushCollation(context, target_distinct, sql_type, true);
229
226
  }
230
227
  break;
231
228
  }
@@ -253,10 +250,7 @@ void Binder::BindModifierTypes(BoundQueryNode &result, const vector<LogicalType>
253
250
  D_ASSERT(bound_colref.binding.column_index < sql_types.size());
254
251
  const auto &sql_type = sql_types[bound_colref.binding.column_index];
255
252
  bound_colref.return_type = sql_types[bound_colref.binding.column_index];
256
- if (sql_type.id() == LogicalTypeId::VARCHAR) {
257
- order_node.expression = ExpressionBinder::PushCollation(context, std::move(order_node.expression),
258
- StringType::GetCollation(sql_type));
259
- }
253
+ ExpressionBinder::PushCollation(context, order_node.expression, sql_type);
260
254
  }
261
255
  break;
262
256
  }
@@ -389,9 +383,8 @@ unique_ptr<BoundQueryNode> Binder::BindSelectNode(SelectNode &statement, unique_
389
383
  bool contains_subquery = bound_expr_ref.HasSubquery();
390
384
 
391
385
  // push a potential collation, if necessary
392
- auto collated_expr = ExpressionBinder::PushCollation(context, std::move(bound_expr),
393
- StringType::GetCollation(group_type), true);
394
- if (!contains_subquery && !collated_expr->Equals(bound_expr_ref)) {
386
+ bool requires_collation = ExpressionBinder::PushCollation(context, bound_expr, group_type, true);
387
+ if (!contains_subquery && requires_collation) {
395
388
  // if there is a collation on a group x, we should group by the collated expr,
396
389
  // but also push a first(x) aggregate in case x is selected (uncollated)
397
390
  info.collated_groups[i] = result->aggregates.size();
@@ -405,7 +398,7 @@ unique_ptr<BoundQueryNode> Binder::BindSelectNode(SelectNode &statement, unique_
405
398
  auto function = function_binder.BindAggregateFunction(first_fun, std::move(first_children));
406
399
  result->aggregates.push_back(std::move(function));
407
400
  }
408
- result->groups.group_expressions.push_back(std::move(collated_expr));
401
+ result->groups.group_expressions.push_back(std::move(bound_expr));
409
402
 
410
403
  // in the unbound expression we DO bind the table names of any ColumnRefs
411
404
  // we do this to make sure that "table.a" and "a" are treated the same
@@ -68,6 +68,16 @@ void Binder::BindSchemaOrCatalog(string &catalog, string &schema) {
68
68
  BindSchemaOrCatalog(context, catalog, schema);
69
69
  }
70
70
 
71
+ const string Binder::BindCatalog(string &catalog) {
72
+ auto &db_manager = DatabaseManager::Get(context);
73
+ optional_ptr<AttachedDatabase> database = db_manager.GetDatabase(context, catalog);
74
+ if (database) {
75
+ return db_manager.GetDatabase(context, catalog).get()->GetName();
76
+ } else {
77
+ return db_manager.GetDefaultDatabase(context);
78
+ }
79
+ }
80
+
71
81
  SchemaCatalogEntry &Binder::BindSchema(CreateInfo &info) {
72
82
  BindSchemaOrCatalog(info.catalog, info.schema);
73
83
  if (IsInvalidCatalog(info.catalog) && info.temporary) {
@@ -456,9 +466,13 @@ BoundStatement Binder::Bind(CreateStatement &stmt) {
456
466
 
457
467
  auto catalog_type = stmt.info->type;
458
468
  switch (catalog_type) {
459
- case CatalogType::SCHEMA_ENTRY:
469
+ case CatalogType::SCHEMA_ENTRY: {
470
+ auto &base = stmt.info->Cast<CreateInfo>();
471
+ auto catalog = BindCatalog(base.catalog);
472
+ properties.modified_databases.insert(catalog);
460
473
  result.plan = make_uniq<LogicalCreate>(LogicalOperatorType::LOGICAL_CREATE_SCHEMA, std::move(stmt.info));
461
474
  break;
475
+ }
462
476
  case CatalogType::VIEW_ENTRY: {
463
477
  auto &base = stmt.info->Cast<CreateViewInfo>();
464
478
  // bind the schema
@@ -43,19 +43,30 @@ shared_ptr<BoundParameterData> BoundParameterMap::CreateOrGetData(const string &
43
43
  }
44
44
 
45
45
  unique_ptr<BoundParameterExpression> BoundParameterMap::BindParameterExpression(ParameterExpression &expr) {
46
- auto &identifier = expr.identifier;
47
- auto return_type = GetReturnType(identifier);
48
46
 
47
+ auto &identifier = expr.identifier;
49
48
  D_ASSERT(!parameter_data.count(identifier));
50
49
 
51
50
  // No value has been supplied yet,
52
- // We return a shared pointer to an object that will get populated wtih a Value later
53
- // When the BoundParameterExpression get executed, this will be used to get the corresponding value
51
+ // We return a shared pointer to an object that will get populated with a Value later
52
+ // When the BoundParameterExpression gets executed, this will be used to get the corresponding value
54
53
  auto param_data = CreateOrGetData(identifier);
55
54
  auto bound_expr = make_uniq<BoundParameterExpression>(identifier);
55
+
56
56
  bound_expr->parameter_data = param_data;
57
- bound_expr->return_type = return_type;
58
57
  bound_expr->alias = expr.alias;
58
+
59
+ auto param_type = param_data->return_type;
60
+ auto identifier_type = GetReturnType(identifier);
61
+
62
+ // we found a type for this bound parameter, but now we found another occurrence with the same identifier,
63
+ // a CAST around this consecutive occurrence might swallow the unknown type of this consecutive occurrence,
64
+ // then, if we do not rebind, we potentially have unknown data types during execution
65
+ if (identifier_type == LogicalType::UNKNOWN && param_type != LogicalType::UNKNOWN) {
66
+ rebind = true;
67
+ }
68
+
69
+ bound_expr->return_type = identifier_type;
59
70
  return bound_expr;
60
71
  }
61
72
 
@@ -98,11 +98,8 @@ BindResult BaseSelectBinder::BindColumnRef(unique_ptr<ParsedExpression> &expr_pt
98
98
  " This is not yet supported.",
99
99
  colref.column_names[0]);
100
100
  }
101
- auto result = BindResult(node.select_list[index]->Copy());
102
- if (result.expression->type == ExpressionType::BOUND_COLUMN_REF) {
103
- auto &result_expr = result.expression->Cast<BoundColumnRefExpression>();
104
- result_expr.depth = depth;
105
- }
101
+ auto copied_expression = node.original_expressions[index]->Copy();
102
+ result = BindExpression(copied_expression, depth, false);
106
103
  return result;
107
104
  }
108
105
  }
@@ -76,7 +76,7 @@ void Planner::CreatePlan(SQLStatement &statement) {
76
76
  }
77
77
  this->properties = binder->properties;
78
78
  this->properties.parameter_count = parameter_count;
79
- properties.bound_all_parameters = parameters_resolved;
79
+ properties.bound_all_parameters = !bound_parameters.rebind && parameters_resolved;
80
80
 
81
81
  Planner::VerifyPlan(context, plan, bound_parameters.GetParametersPtr());
82
82
 
@@ -252,6 +252,7 @@ void DuckTransactionManager::RollbackTransaction(Transaction *transaction_p) {
252
252
  }
253
253
 
254
254
  void DuckTransactionManager::RemoveTransaction(DuckTransaction &transaction) noexcept {
255
+ bool changes_made = transaction.ChangesMade();
255
256
  // remove the transaction from the list of active transactions
256
257
  idx_t t_index = active_transactions.size();
257
258
  // check for the lowest and highest start time in the list of transactions
@@ -275,15 +276,18 @@ void DuckTransactionManager::RemoveTransaction(DuckTransaction &transaction) noe
275
276
  D_ASSERT(t_index != active_transactions.size());
276
277
  auto current_transaction = std::move(active_transactions[t_index]);
277
278
  auto current_query = DatabaseManager::Get(db).ActiveQueryNumber();
278
- if (transaction.commit_id != 0) {
279
- // the transaction was committed, add it to the list of recently
280
- // committed transactions
281
- recently_committed_transactions.push_back(std::move(current_transaction));
282
- } else {
283
- // the transaction was aborted, but we might still need its information
284
- // add it to the set of transactions awaiting GC
285
- current_transaction->highest_active_query = current_query;
286
- old_transactions.push_back(std::move(current_transaction));
279
+ if (changes_made) {
280
+ // if the transaction made any changes we need to keep it around
281
+ if (transaction.commit_id != 0) {
282
+ // the transaction was committed, add it to the list of recently
283
+ // committed transactions
284
+ recently_committed_transactions.push_back(std::move(current_transaction));
285
+ } else {
286
+ // the transaction was aborted, but we might still need its information
287
+ // add it to the set of transactions awaiting GC
288
+ current_transaction->highest_active_query = current_query;
289
+ old_transactions.push_back(std::move(current_transaction));
290
+ }
287
291
  }
288
292
  // remove the transaction from the set of currently active transactions
289
293
  active_transactions.erase(active_transactions.begin() + t_index);
@@ -92,7 +92,8 @@ struct Encoding {
92
92
  DELTA_BINARY_PACKED = 5,
93
93
  DELTA_LENGTH_BYTE_ARRAY = 6,
94
94
  DELTA_BYTE_ARRAY = 7,
95
- RLE_DICTIONARY = 8
95
+ RLE_DICTIONARY = 8,
96
+ BYTE_STREAM_SPLIT = 9,
96
97
  };
97
98
  };
98
99
 
@@ -348,17 +348,17 @@
348
348
 
349
349
  #include "extension/icu/third_party/icu/i18n/wintzimpl.cpp"
350
350
 
351
- #include "extension/icu/third_party/icu/i18n/double-conversion-strtod.cpp"
351
+ #include "extension/icu/third_party/icu/i18n/double-conversion-fast-dtoa.cpp"
352
352
 
353
- #include "extension/icu/third_party/icu/i18n/double-conversion-double-to-string.cpp"
353
+ #include "extension/icu/third_party/icu/i18n/double-conversion-cached-powers.cpp"
354
354
 
355
- #include "extension/icu/third_party/icu/i18n/double-conversion-fast-dtoa.cpp"
355
+ #include "extension/icu/third_party/icu/i18n/double-conversion-strtod.cpp"
356
356
 
357
- #include "extension/icu/third_party/icu/i18n/double-conversion-string-to-double.cpp"
357
+ #include "extension/icu/third_party/icu/i18n/double-conversion-double-to-string.cpp"
358
358
 
359
359
  #include "extension/icu/third_party/icu/i18n/double-conversion-bignum-dtoa.cpp"
360
360
 
361
361
  #include "extension/icu/third_party/icu/i18n/double-conversion-bignum.cpp"
362
362
 
363
- #include "extension/icu/third_party/icu/i18n/double-conversion-cached-powers.cpp"
363
+ #include "extension/icu/third_party/icu/i18n/double-conversion-string-to-double.cpp"
364
364
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  #include "src/optimizer/pushdown/pushdown_cross_product.cpp"
4
4
 
5
+ #include "src/optimizer/pushdown/pushdown_distinct.cpp"
6
+
5
7
  #include "src/optimizer/pushdown/pushdown_filter.cpp"
6
8
 
7
9
  #include "src/optimizer/pushdown/pushdown_get.cpp"
package/src/statement.cpp CHANGED
@@ -377,10 +377,10 @@ struct RunPreparedTask : public Task {
377
377
  // query results, the string data is owned by the QueryResult
378
378
  auto result_ref_ptr = new std::shared_ptr<duckdb::QueryResult>(result_ptr);
379
379
 
380
- auto array_buffer =
381
- Napi::ArrayBuffer::New(env, (void *)blob.GetData(), blob.GetSize(), deleter, result_ref_ptr);
380
+ auto array_buffer = Napi::Buffer<char>::NewOrCopy(env, (char *)blob.GetData(), blob.GetSize(),
381
+ deleter, result_ref_ptr);
382
382
 
383
- auto typed_array = Napi::Uint8Array::New(env, blob.GetSize(), array_buffer, 0);
383
+ auto typed_array = Napi::TypedArrayOf<char>(env, array_buffer);
384
384
 
385
385
  // TODO we should handle this in duckdb probably
386
386
  if (is_header) {
@@ -708,7 +708,7 @@ struct GetNextArrowIpcTask : public Task {
708
708
  delete static_cast<unique_ptr<duckdb::DataChunk> *>(hint);
709
709
  };
710
710
  auto array_buffer =
711
- Napi::ArrayBuffer::New(env, (void *)blob.GetData(), blob.GetSize(), deleter, data_chunk_ptr);
711
+ Napi::Buffer<char>::NewOrCopy(env, (char *)blob.GetData(), blob.GetSize(), deleter, data_chunk_ptr);
712
712
 
713
713
  deferred.Resolve(array_buffer);
714
714
  }
@@ -9,7 +9,9 @@ describe('arrow IPC API fails neatly when extension not loaded', function() {
9
9
  let conn;
10
10
  before((done) => {
11
11
  db = new duckdb.Database(':memory:', {"allow_unsigned_extensions": "true"}, () => {
12
- done();
12
+ db.all('SET autoload_known_extensions=false;', () => {
13
+ done();
14
+ });
13
15
  });
14
16
  });
15
17
 
@@ -8,7 +8,7 @@ describe('can query parquet', function() {
8
8
  });
9
9
 
10
10
  it('should be able to read parquet files', function(done) {
11
- db.run("select * from parquet_scan('../../data/parquet-testing/userdata1.parquet')", done);
11
+ db.run("select * from parquet_scan('test/userdata1.parquet')", done);
12
12
  });
13
13
 
14
14
  });
Binary file
@@ -5,4 +5,4 @@ set -x
5
5
 
6
6
  cd `dirname $0`
7
7
 
8
- python3 configure.py
8
+ python3 vendor.py $@
@@ -2,6 +2,17 @@ import os
2
2
  import sys
3
3
  import json
4
4
  import pickle
5
+ import argparse
6
+
7
+ parser = argparse.ArgumentParser(description='Inlines DuckDB Sources')
8
+
9
+ parser.add_argument('--duckdb', action='store',
10
+ help='Path to the DuckDB Version to be vendored in', required=True, type=str)
11
+
12
+
13
+
14
+ args = parser.parse_args()
15
+
5
16
 
6
17
  # list of extensions to bundle
7
18
  extensions = ['parquet', 'icu', 'json']
@@ -14,7 +25,7 @@ gyp_out = os.path.join(basedir, 'binding.gyp')
14
25
  cache_file = os.path.join(basedir, 'filelist.cache')
15
26
 
16
27
  # path to package_build.py
17
- os.chdir(os.path.join('..', '..'))
28
+ os.chdir(os.path.join(args.duckdb))
18
29
  scripts_dir = 'scripts'
19
30
 
20
31
  sys.path.append(scripts_dir)
@@ -1,10 +0,0 @@
1
- ################################################################################
2
- # NodeJS DuckDB extension config
3
- ################################################################################
4
- #
5
- # This is the default extension configuration for NodeJS builds. Basically it means that all these extensions are
6
- # "baked in" to the NodeJS binaries Note that the configuration here is only when building Node using the main
7
- # CMakeLists.txt file with the `BUILD_NODE` variable.
8
- # TODO: unify this by making setup.py also use this configuration, making this the config for all Node builds
9
- duckdb_extension_load(json)
10
- duckdb_extension_load(icu)