duckdb 0.3.2-dev1156.0 → 0.3.2-dev1173.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.2-dev1156.0",
4
+ "version": "0.3.2-dev1173.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -110209,6 +110209,79 @@ string CreateViewRelation::ToString(idx_t depth) {
110209
110209
  return str + child->ToString(depth + 1);
110210
110210
  }
110211
110211
 
110212
+ } // namespace duckdb
110213
+ //===----------------------------------------------------------------------===//
110214
+ // DuckDB
110215
+ //
110216
+ // duckdb/main/relation/cross_product_relation.hpp
110217
+ //
110218
+ //
110219
+ //===----------------------------------------------------------------------===//
110220
+
110221
+
110222
+
110223
+
110224
+
110225
+ namespace duckdb {
110226
+
110227
+ class CrossProductRelation : public Relation {
110228
+ public:
110229
+ CrossProductRelation(shared_ptr<Relation> left, shared_ptr<Relation> right);
110230
+
110231
+ shared_ptr<Relation> left;
110232
+ shared_ptr<Relation> right;
110233
+ vector<ColumnDefinition> columns;
110234
+
110235
+ public:
110236
+ unique_ptr<QueryNode> GetQueryNode() override;
110237
+
110238
+ const vector<ColumnDefinition> &Columns() override;
110239
+ string ToString(idx_t depth) override;
110240
+
110241
+ unique_ptr<TableRef> GetTableRef() override;
110242
+ };
110243
+
110244
+ } // namespace duckdb
110245
+
110246
+
110247
+
110248
+
110249
+
110250
+
110251
+ namespace duckdb {
110252
+
110253
+ CrossProductRelation::CrossProductRelation(shared_ptr<Relation> left_p, shared_ptr<Relation> right_p)
110254
+ : Relation(left_p->context, RelationType::CROSS_PRODUCT_RELATION), left(move(left_p)), right(move(right_p)) {
110255
+ if (&left->context != &right->context) {
110256
+ throw Exception("Cannot combine LEFT and RIGHT relations of different connections!");
110257
+ }
110258
+ context.TryBindRelation(*this, this->columns);
110259
+ }
110260
+
110261
+ unique_ptr<QueryNode> CrossProductRelation::GetQueryNode() {
110262
+ auto result = make_unique<SelectNode>();
110263
+ result->select_list.push_back(make_unique<StarExpression>());
110264
+ result->from_table = GetTableRef();
110265
+ return move(result);
110266
+ }
110267
+
110268
+ unique_ptr<TableRef> CrossProductRelation::GetTableRef() {
110269
+ auto cross_product_ref = make_unique<CrossProductRef>();
110270
+ cross_product_ref->left = left->GetTableRef();
110271
+ cross_product_ref->right = right->GetTableRef();
110272
+ return move(cross_product_ref);
110273
+ }
110274
+
110275
+ const vector<ColumnDefinition> &CrossProductRelation::Columns() {
110276
+ return this->columns;
110277
+ }
110278
+
110279
+ string CrossProductRelation::ToString(idx_t depth) {
110280
+ string str = RenderWhitespace(depth);
110281
+ str = "Cross Product";
110282
+ return str + "\n" + left->ToString(depth + 1) + right->ToString(depth + 1);
110283
+ }
110284
+
110212
110285
  } // namespace duckdb
110213
110286
  //===----------------------------------------------------------------------===//
110214
110287
  // DuckDB
@@ -110793,8 +110866,8 @@ const vector<ColumnDefinition> &JoinRelation::Columns() {
110793
110866
 
110794
110867
  string JoinRelation::ToString(idx_t depth) {
110795
110868
  string str = RenderWhitespace(depth);
110796
- str = "Join";
110797
- return str + "\n" + left->ToString(depth + 1) + right->ToString(depth + 1);
110869
+ str = "Join " + JoinTypeToString(join_type);
110870
+ return str + "\n" + left->ToString(depth + 1) + "\n" + right->ToString(depth + 1);
110798
110871
  }
110799
110872
 
110800
110873
  } // namespace duckdb
@@ -111855,6 +111928,7 @@ string WriteCSVRelation::ToString(idx_t depth) {
111855
111928
 
111856
111929
 
111857
111930
 
111931
+
111858
111932
 
111859
111933
 
111860
111934
  namespace duckdb {
@@ -111967,6 +112041,10 @@ shared_ptr<Relation> Relation::Join(const shared_ptr<Relation> &other, const str
111967
112041
  }
111968
112042
  }
111969
112043
 
112044
+ shared_ptr<Relation> Relation::CrossProduct(const shared_ptr<Relation> &other) {
112045
+ return make_shared<CrossProductRelation>(shared_from_this(), other);
112046
+ }
112047
+
111970
112048
  shared_ptr<Relation> Relation::Union(const shared_ptr<Relation> &other) {
111971
112049
  return make_shared<SetOpRelation>(shared_from_this(), other, SetOperationType::UNION);
111972
112050
  }
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 "9707f53ce"
15
- #define DUCKDB_VERSION "v0.3.2-dev1156"
14
+ #define DUCKDB_SOURCE_ID "31a56cf8d"
15
+ #define DUCKDB_VERSION "v0.3.2-dev1173"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //
@@ -10680,6 +10680,9 @@ public:
10680
10680
  DUCKDB_API shared_ptr<Relation> Join(const shared_ptr<Relation> &other, const string &condition,
10681
10681
  JoinType type = JoinType::INNER);
10682
10682
 
10683
+ // CROSS PRODUCT operation
10684
+ DUCKDB_API shared_ptr<Relation> CrossProduct(const shared_ptr<Relation> &other);
10685
+
10683
10686
  // SET operations
10684
10687
  DUCKDB_API shared_ptr<Relation> Union(const shared_ptr<Relation> &other);
10685
10688
  DUCKDB_API shared_ptr<Relation> Except(const shared_ptr<Relation> &other);