duckdb 0.3.3-dev1282.0 → 0.3.3-dev1297.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-dev1282.0",
4
+ "version": "0.3.3-dev1297.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -46749,9 +46749,7 @@ void AdaptiveFilter::AdaptRuntimeStatistics(double duration) {
46749
46749
 
46750
46750
 
46751
46751
 
46752
-
46753
46752
  #include <cmath>
46754
- #include <map>
46755
46753
 
46756
46754
  namespace duckdb {
46757
46755
 
@@ -47966,7 +47964,6 @@ idx_t ExpressionExecutor::Select(const BoundBetweenExpression &expr, ExpressionS
47966
47964
 
47967
47965
 
47968
47966
 
47969
-
47970
47967
  namespace duckdb {
47971
47968
 
47972
47969
  struct CaseExpressionState : public ExpressionState {
@@ -50968,9 +50965,6 @@ private:
50968
50965
 
50969
50966
 
50970
50967
 
50971
-
50972
-
50973
-
50974
50968
  namespace duckdb {
50975
50969
 
50976
50970
  using ValidityBytes = JoinHashTable::ValidityBytes;
@@ -67004,7 +66998,6 @@ void PartitionableHashTable::Finalize() {
67004
66998
 
67005
66999
 
67006
67000
 
67007
-
67008
67001
  namespace duckdb {
67009
67002
 
67010
67003
  PerfectAggregateHashTable::PerfectAggregateHashTable(BufferManager &buffer_manager,
@@ -71876,8 +71869,6 @@ void BaseReservoirSampling::ReplaceElement() {
71876
71869
 
71877
71870
 
71878
71871
 
71879
- #include <cmath>
71880
-
71881
71872
  namespace duckdb {
71882
71873
 
71883
71874
  WindowSegmentTree::WindowSegmentTree(AggregateFunction &aggregate, FunctionData *bind_info,
@@ -96609,11 +96600,6 @@ void ScalarFunction::NopFunction(DataChunk &input, ExpressionState &state, Vecto
96609
96600
 
96610
96601
 
96611
96602
 
96612
-
96613
-
96614
-
96615
-
96616
-
96617
96603
  namespace duckdb {
96618
96604
 
96619
96605
  ScalarMacroFunction::ScalarMacroFunction(unique_ptr<ParsedExpression> expression)
@@ -96640,8 +96626,6 @@ unique_ptr<MacroFunction> ScalarMacroFunction::Copy() {
96640
96626
 
96641
96627
 
96642
96628
 
96643
-
96644
-
96645
96629
  //===----------------------------------------------------------------------===//
96646
96630
  // DuckDB
96647
96631
  //
@@ -96977,9 +96961,14 @@ unique_ptr<FunctionData> ArrowTableFunction::ArrowScanBind(ClientContext &contex
96977
96961
  uintptr_t stream_factory_ptr,
96978
96962
  std::pair<std::unordered_map<idx_t, string>, std::vector<string>> & project_columns,
96979
96963
  TableFilterCollection * filters);
96964
+
96965
+ typedef void (*stream_factory_get_schema_t)(uintptr_t stream_factory_ptr, ArrowSchemaWrapper & schema);
96966
+
96980
96967
  auto stream_factory_ptr = input.inputs[0].GetPointer();
96981
96968
  auto stream_factory_produce = (stream_factory_produce_t)input.inputs[1].GetPointer();
96982
- auto rows_per_thread = input.inputs[2].GetValue<uint64_t>();
96969
+ auto stream_factory_get_schema = (stream_factory_get_schema_t)input.inputs[2].GetPointer();
96970
+ auto rows_per_thread = input.inputs[3].GetValue<uint64_t>();
96971
+
96983
96972
  std::pair<std::unordered_map<idx_t, string>, std::vector<string>> project_columns;
96984
96973
  #ifndef DUCKDB_NO_THREADS
96985
96974
 
@@ -96989,15 +96978,7 @@ unique_ptr<FunctionData> ArrowTableFunction::ArrowScanBind(ClientContext &contex
96989
96978
  auto res = make_unique<ArrowScanFunctionData>(rows_per_thread, stream_factory_produce, stream_factory_ptr);
96990
96979
  #endif
96991
96980
  auto &data = *res;
96992
- auto stream = stream_factory_produce(stream_factory_ptr, project_columns, nullptr);
96993
-
96994
- data.number_of_rows = stream->number_of_rows;
96995
- if (!stream) {
96996
- throw InvalidInputException("arrow_scan: NULL pointer passed");
96997
- }
96998
-
96999
- stream->GetSchema(data.schema_root);
97000
-
96981
+ stream_factory_get_schema(stream_factory_ptr, data.schema_root);
97001
96982
  for (idx_t col_idx = 0; col_idx < (idx_t)data.schema_root.arrow_schema.n_children; col_idx++) {
97002
96983
  auto &schema = *data.schema_root.arrow_schema.children[col_idx];
97003
96984
  if (!schema.release) {
@@ -97907,11 +97888,11 @@ double ArrowTableFunction::ArrowProgress(ClientContext &context, const FunctionD
97907
97888
 
97908
97889
  void ArrowTableFunction::RegisterFunction(BuiltinFunctions &set) {
97909
97890
  TableFunctionSet arrow("arrow_scan");
97910
- arrow.AddFunction(TableFunction({LogicalType::POINTER, LogicalType::POINTER, LogicalType::UBIGINT},
97911
- ArrowScanFunction, ArrowScanBind, ArrowScanInit, nullptr, nullptr, nullptr,
97912
- ArrowScanCardinality, nullptr, nullptr, ArrowScanMaxThreads,
97913
- ArrowScanInitParallelState, ArrowScanFunctionParallel, ArrowScanParallelInit,
97914
- ArrowScanParallelStateNext, true, true, ArrowProgress));
97891
+ arrow.AddFunction(
97892
+ TableFunction({LogicalType::POINTER, LogicalType::POINTER, LogicalType::POINTER, LogicalType::UBIGINT},
97893
+ ArrowScanFunction, ArrowScanBind, ArrowScanInit, nullptr, nullptr, nullptr, ArrowScanCardinality,
97894
+ nullptr, nullptr, ArrowScanMaxThreads, ArrowScanInitParallelState, ArrowScanFunctionParallel,
97895
+ ArrowScanParallelInit, ArrowScanParallelStateNext, true, true, ArrowProgress));
97915
97896
  set.AddFunction(arrow);
97916
97897
  }
97917
97898
 
@@ -98062,7 +98043,6 @@ struct ReadCSVTableFunction {
98062
98043
 
98063
98044
 
98064
98045
 
98065
-
98066
98046
  #include <limits>
98067
98047
 
98068
98048
  namespace duckdb {
@@ -98772,6 +98752,7 @@ struct TestAllTypesFun {
98772
98752
 
98773
98753
 
98774
98754
 
98755
+
98775
98756
  namespace duckdb {
98776
98757
 
98777
98758
  struct PragmaDetailedProfilingOutputOperatorData : public FunctionOperatorData {
@@ -99320,7 +99301,6 @@ void BuiltinFunctions::RegisterTableFunctions() {
99320
99301
 
99321
99302
 
99322
99303
 
99323
-
99324
99304
  #include <limits>
99325
99305
 
99326
99306
  namespace duckdb {
@@ -103349,8 +103329,6 @@ void UDFWrapper::RegisterAggrFunction(AggregateFunction aggr_function, ClientCon
103349
103329
 
103350
103330
 
103351
103331
 
103352
-
103353
-
103354
103332
  namespace duckdb {
103355
103333
 
103356
103334
  BaseAppender::BaseAppender() : column(0) {
@@ -104817,7 +104795,6 @@ duckdb_logical_type duckdb_struct_type_child_type(duckdb_logical_type type, idx_
104817
104795
 
104818
104796
 
104819
104797
 
104820
-
104821
104798
  using duckdb::Connection;
104822
104799
  using duckdb::date_t;
104823
104800
  using duckdb::dtime_t;
@@ -106556,67 +106533,6 @@ public:
106556
106533
 
106557
106534
  } // namespace duckdb
106558
106535
 
106559
- //===----------------------------------------------------------------------===//
106560
- // DuckDB
106561
- //
106562
- // duckdb/parser/statement/execute_statement.hpp
106563
- //
106564
- //
106565
- //===----------------------------------------------------------------------===//
106566
-
106567
-
106568
-
106569
-
106570
-
106571
-
106572
-
106573
- namespace duckdb {
106574
-
106575
- class ExecuteStatement : public SQLStatement {
106576
- public:
106577
- ExecuteStatement();
106578
-
106579
- string name;
106580
- vector<unique_ptr<ParsedExpression>> values;
106581
-
106582
- protected:
106583
- ExecuteStatement(const ExecuteStatement &other);
106584
-
106585
- public:
106586
- unique_ptr<SQLStatement> Copy() const override;
106587
- };
106588
- } // namespace duckdb
106589
-
106590
-
106591
- //===----------------------------------------------------------------------===//
106592
- // DuckDB
106593
- //
106594
- // duckdb/parser/statement/prepare_statement.hpp
106595
- //
106596
- //
106597
- //===----------------------------------------------------------------------===//
106598
-
106599
-
106600
-
106601
-
106602
-
106603
-
106604
- namespace duckdb {
106605
-
106606
- class PrepareStatement : public SQLStatement {
106607
- public:
106608
- PrepareStatement();
106609
-
106610
- unique_ptr<SQLStatement> statement;
106611
- string name;
106612
-
106613
- protected:
106614
- PrepareStatement(const PrepareStatement &other);
106615
-
106616
- public:
106617
- unique_ptr<SQLStatement> Copy() const override;
106618
- };
106619
- } // namespace duckdb
106620
106536
 
106621
106537
 
106622
106538
 
@@ -106780,7 +106696,6 @@ private:
106780
106696
 
106781
106697
 
106782
106698
 
106783
-
106784
106699
  namespace duckdb {
106785
106700
 
106786
106701
  struct ActiveQueryContext {
@@ -117939,7 +117854,6 @@ using std::ofstream;
117939
117854
 
117940
117855
 
117941
117856
 
117942
-
117943
117857
  #include <utility>
117944
117858
  #include <algorithm>
117945
117859
 
@@ -119160,7 +119074,6 @@ public:
119160
119074
 
119161
119075
 
119162
119076
 
119163
-
119164
119077
  namespace duckdb {
119165
119078
 
119166
119079
  CreateTableRelation::CreateTableRelation(shared_ptr<Relation> child_p, string schema_name, string table_name)
@@ -119232,7 +119145,6 @@ public:
119232
119145
 
119233
119146
 
119234
119147
 
119235
-
119236
119148
  namespace duckdb {
119237
119149
 
119238
119150
  CreateViewRelation::CreateViewRelation(shared_ptr<Relation> child_p, string view_name_p, bool replace_p,
@@ -145686,6 +145598,36 @@ unique_ptr<SQLStatement> DropStatement::Copy() const {
145686
145598
  }
145687
145599
 
145688
145600
  } // namespace duckdb
145601
+ //===----------------------------------------------------------------------===//
145602
+ // DuckDB
145603
+ //
145604
+ // duckdb/parser/statement/execute_statement.hpp
145605
+ //
145606
+ //
145607
+ //===----------------------------------------------------------------------===//
145608
+
145609
+
145610
+
145611
+
145612
+
145613
+
145614
+
145615
+ namespace duckdb {
145616
+
145617
+ class ExecuteStatement : public SQLStatement {
145618
+ public:
145619
+ ExecuteStatement();
145620
+
145621
+ string name;
145622
+ vector<unique_ptr<ParsedExpression>> values;
145623
+
145624
+ protected:
145625
+ ExecuteStatement(const ExecuteStatement &other);
145626
+
145627
+ public:
145628
+ unique_ptr<SQLStatement> Copy() const override;
145629
+ };
145630
+ } // namespace duckdb
145689
145631
 
145690
145632
 
145691
145633
  namespace duckdb {
@@ -145843,6 +145785,35 @@ unique_ptr<SQLStatement> PragmaStatement::Copy() const {
145843
145785
  }
145844
145786
 
145845
145787
  } // namespace duckdb
145788
+ //===----------------------------------------------------------------------===//
145789
+ // DuckDB
145790
+ //
145791
+ // duckdb/parser/statement/prepare_statement.hpp
145792
+ //
145793
+ //
145794
+ //===----------------------------------------------------------------------===//
145795
+
145796
+
145797
+
145798
+
145799
+
145800
+
145801
+ namespace duckdb {
145802
+
145803
+ class PrepareStatement : public SQLStatement {
145804
+ public:
145805
+ PrepareStatement();
145806
+
145807
+ unique_ptr<SQLStatement> statement;
145808
+ string name;
145809
+
145810
+ protected:
145811
+ PrepareStatement(const PrepareStatement &other);
145812
+
145813
+ public:
145814
+ unique_ptr<SQLStatement> Copy() const override;
145815
+ };
145816
+ } // namespace duckdb
145846
145817
 
145847
145818
 
145848
145819
  namespace duckdb {
@@ -153894,6 +153865,9 @@ unique_ptr<BoundResultModifier> Binder::BindLimit(LimitModifier &limit_mod) {
153894
153865
  result->limit = BindDelimiter(context, move(limit_mod.limit), LogicalType::BIGINT, val);
153895
153866
  if (!result->limit) {
153896
153867
  result->limit_val = val.GetValue<int64_t>();
153868
+ if (result->limit_val < 0) {
153869
+ throw BinderException("LIMIT cannot be negative");
153870
+ }
153897
153871
  }
153898
153872
  }
153899
153873
  if (limit_mod.offset) {
@@ -153901,6 +153875,9 @@ unique_ptr<BoundResultModifier> Binder::BindLimit(LimitModifier &limit_mod) {
153901
153875
  result->offset = BindDelimiter(context, move(limit_mod.offset), LogicalType::BIGINT, val);
153902
153876
  if (!result->offset) {
153903
153877
  result->offset_val = val.GetValue<int64_t>();
153878
+ if (result->offset_val < 0) {
153879
+ throw BinderException("OFFSET cannot be negative");
153880
+ }
153904
153881
  }
153905
153882
  }
153906
153883
  return move(result);
@@ -164374,8 +164351,6 @@ void WriteOverflowStringsToDisk::AllocateNewBlock(block_id_t new_block_id) {
164374
164351
 
164375
164352
 
164376
164353
 
164377
-
164378
-
164379
164354
 
164380
164355
 
164381
164356
 
@@ -178158,8 +178133,6 @@ bool ValidityColumnData::CheckZonemap(ColumnScanState &state, TableFilter &filte
178158
178133
 
178159
178134
 
178160
178135
 
178161
-
178162
-
178163
178136
 
178164
178137
  namespace duckdb {
178165
178138
 
@@ -178677,7 +178650,6 @@ void ReplayState::ReplayCheckpoint() {
178677
178650
 
178678
178651
 
178679
178652
 
178680
-
178681
178653
  #include <cstring>
178682
178654
 
178683
178655
  namespace duckdb {
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 "a52157e01"
15
- #define DUCKDB_VERSION "v0.3.3-dev1282"
14
+ #define DUCKDB_SOURCE_ID "c47bd311e"
15
+ #define DUCKDB_VERSION "v0.3.3-dev1297"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //