duckdb 0.3.2-dev1197.0 → 0.3.2-dev1206.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/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 "bd1402371"
15
- #define DUCKDB_VERSION "v0.3.2-dev1197"
14
+ #define DUCKDB_SOURCE_ID "babdfe066"
15
+ #define DUCKDB_VERSION "v0.3.2-dev1206"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //
@@ -21000,7 +21000,7 @@ private:
21000
21000
  //===----------------------------------------------------------------------===//
21001
21001
  // DuckDB
21002
21002
  //
21003
- // duckdb/parser/expression/star_expression.hpp
21003
+ // duckdb/parser/expression/comparison_expression.hpp
21004
21004
  //
21005
21005
  //
21006
21006
  //===----------------------------------------------------------------------===//
@@ -21009,25 +21009,20 @@ private:
21009
21009
 
21010
21010
 
21011
21011
 
21012
-
21013
21012
  namespace duckdb {
21014
-
21015
- //! Represents a * expression in the SELECT clause
21016
- class StarExpression : public ParsedExpression {
21013
+ //! ComparisonExpression represents a boolean comparison (e.g. =, >=, <>). Always returns a boolean
21014
+ //! and has two children.
21015
+ class ComparisonExpression : public ParsedExpression {
21017
21016
  public:
21018
- StarExpression(string relation_name = string());
21017
+ ComparisonExpression(ExpressionType type, unique_ptr<ParsedExpression> left, unique_ptr<ParsedExpression> right);
21019
21018
 
21020
- //! The relation name in case of tbl.*, or empty if this is a normal *
21021
- string relation_name;
21022
- //! List of columns to exclude from the STAR expression
21023
- case_insensitive_set_t exclude_list;
21024
- //! List of columns to replace with another expression
21025
- case_insensitive_map_t<unique_ptr<ParsedExpression>> replace_list;
21019
+ unique_ptr<ParsedExpression> left;
21020
+ unique_ptr<ParsedExpression> right;
21026
21021
 
21027
21022
  public:
21028
21023
  string ToString() const override;
21029
21024
 
21030
- static bool Equals(const StarExpression *a, const StarExpression *b);
21025
+ static bool Equals(const ComparisonExpression *a, const ComparisonExpression *b);
21031
21026
 
21032
21027
  unique_ptr<ParsedExpression> Copy() const override;
21033
21028
 
@@ -21038,7 +21033,7 @@ public:
21038
21033
  //===----------------------------------------------------------------------===//
21039
21034
  // DuckDB
21040
21035
  //
21041
- // duckdb/parser/expression/conjunction_expression.hpp
21036
+ // duckdb/parser/expression/constant_expression.hpp
21042
21037
  //
21043
21038
  //
21044
21039
  //===----------------------------------------------------------------------===//
@@ -21050,32 +21045,31 @@ public:
21050
21045
 
21051
21046
  namespace duckdb {
21052
21047
 
21053
- //! Represents a conjunction (AND/OR)
21054
- class ConjunctionExpression : public ParsedExpression {
21048
+ //! ConstantExpression represents a constant value in the query
21049
+ class ConstantExpression : public ParsedExpression {
21055
21050
  public:
21056
- explicit ConjunctionExpression(ExpressionType type);
21057
- ConjunctionExpression(ExpressionType type, vector<unique_ptr<ParsedExpression>> children);
21058
- ConjunctionExpression(ExpressionType type, unique_ptr<ParsedExpression> left, unique_ptr<ParsedExpression> right);
21051
+ explicit ConstantExpression(Value val);
21059
21052
 
21060
- vector<unique_ptr<ParsedExpression>> children;
21053
+ //! The constant value referenced
21054
+ Value value;
21061
21055
 
21062
21056
  public:
21063
- void AddExpression(unique_ptr<ParsedExpression> expr);
21064
-
21065
21057
  string ToString() const override;
21066
21058
 
21067
- static bool Equals(const ConjunctionExpression *a, const ConjunctionExpression *b);
21059
+ static bool Equals(const ConstantExpression *a, const ConstantExpression *b);
21060
+ hash_t Hash() const override;
21068
21061
 
21069
21062
  unique_ptr<ParsedExpression> Copy() const override;
21070
21063
 
21071
21064
  void Serialize(FieldWriter &writer) const override;
21072
21065
  static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21073
21066
  };
21067
+
21074
21068
  } // namespace duckdb
21075
21069
  //===----------------------------------------------------------------------===//
21076
21070
  // DuckDB
21077
21071
  //
21078
- // duckdb/parser/expression/collate_expression.hpp
21072
+ // duckdb/parser/expression/operator_expression.hpp
21079
21073
  //
21080
21074
  //
21081
21075
  //===----------------------------------------------------------------------===//
@@ -21084,22 +21078,21 @@ public:
21084
21078
 
21085
21079
 
21086
21080
 
21087
- namespace duckdb {
21088
21081
 
21089
- //! CollateExpression represents a COLLATE statement
21090
- class CollateExpression : public ParsedExpression {
21082
+ namespace duckdb {
21083
+ //! Represents a built-in operator expression
21084
+ class OperatorExpression : public ParsedExpression {
21091
21085
  public:
21092
- CollateExpression(string collation, unique_ptr<ParsedExpression> child);
21086
+ explicit OperatorExpression(ExpressionType type, unique_ptr<ParsedExpression> left = nullptr,
21087
+ unique_ptr<ParsedExpression> right = nullptr);
21088
+ OperatorExpression(ExpressionType type, vector<unique_ptr<ParsedExpression>> children);
21093
21089
 
21094
- //! The child of the cast expression
21095
- unique_ptr<ParsedExpression> child;
21096
- //! The collation clause
21097
- string collation;
21090
+ vector<unique_ptr<ParsedExpression>> children;
21098
21091
 
21099
21092
  public:
21100
21093
  string ToString() const override;
21101
21094
 
21102
- static bool Equals(const CollateExpression *a, const CollateExpression *b);
21095
+ static bool Equals(const OperatorExpression *a, const OperatorExpression *b);
21103
21096
 
21104
21097
  unique_ptr<ParsedExpression> Copy() const override;
21105
21098
 
@@ -21159,7 +21152,7 @@ public:
21159
21152
  //===----------------------------------------------------------------------===//
21160
21153
  // DuckDB
21161
21154
  //
21162
- // duckdb/parser/expression/constant_expression.hpp
21155
+ // duckdb/parser/expression/conjunction_expression.hpp
21163
21156
  //
21164
21157
  //
21165
21158
  //===----------------------------------------------------------------------===//
@@ -21171,31 +21164,32 @@ public:
21171
21164
 
21172
21165
  namespace duckdb {
21173
21166
 
21174
- //! ConstantExpression represents a constant value in the query
21175
- class ConstantExpression : public ParsedExpression {
21167
+ //! Represents a conjunction (AND/OR)
21168
+ class ConjunctionExpression : public ParsedExpression {
21176
21169
  public:
21177
- explicit ConstantExpression(Value val);
21170
+ explicit ConjunctionExpression(ExpressionType type);
21171
+ ConjunctionExpression(ExpressionType type, vector<unique_ptr<ParsedExpression>> children);
21172
+ ConjunctionExpression(ExpressionType type, unique_ptr<ParsedExpression> left, unique_ptr<ParsedExpression> right);
21178
21173
 
21179
- //! The constant value referenced
21180
- Value value;
21174
+ vector<unique_ptr<ParsedExpression>> children;
21181
21175
 
21182
21176
  public:
21177
+ void AddExpression(unique_ptr<ParsedExpression> expr);
21178
+
21183
21179
  string ToString() const override;
21184
21180
 
21185
- static bool Equals(const ConstantExpression *a, const ConstantExpression *b);
21186
- hash_t Hash() const override;
21181
+ static bool Equals(const ConjunctionExpression *a, const ConjunctionExpression *b);
21187
21182
 
21188
21183
  unique_ptr<ParsedExpression> Copy() const override;
21189
21184
 
21190
21185
  void Serialize(FieldWriter &writer) const override;
21191
21186
  static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21192
21187
  };
21193
-
21194
21188
  } // namespace duckdb
21195
21189
  //===----------------------------------------------------------------------===//
21196
21190
  // DuckDB
21197
21191
  //
21198
- // duckdb/parser/expression/lambda_expression.hpp
21192
+ // duckdb/parser/expression/between_expression.hpp
21199
21193
  //
21200
21194
  //
21201
21195
  //===----------------------------------------------------------------------===//
@@ -21204,35 +21198,32 @@ public:
21204
21198
 
21205
21199
 
21206
21200
 
21207
-
21208
21201
  namespace duckdb {
21209
21202
 
21210
- //! LambdaExpression represents a lambda operator that can be used for e.g. mapping an expression to a list
21211
- //! Lambda expressions are written in the form of "capture -> expr", e.g. "x -> x + 1"
21212
- class LambdaExpression : public ParsedExpression {
21203
+ class BetweenExpression : public ParsedExpression {
21213
21204
  public:
21214
- LambdaExpression(vector<string> parameters, unique_ptr<ParsedExpression> expression);
21205
+ BetweenExpression(unique_ptr<ParsedExpression> input, unique_ptr<ParsedExpression> lower,
21206
+ unique_ptr<ParsedExpression> upper);
21215
21207
 
21216
- vector<string> parameters;
21217
- unique_ptr<ParsedExpression> expression;
21208
+ unique_ptr<ParsedExpression> input;
21209
+ unique_ptr<ParsedExpression> lower;
21210
+ unique_ptr<ParsedExpression> upper;
21218
21211
 
21219
21212
  public:
21220
21213
  string ToString() const override;
21221
21214
 
21222
- static bool Equals(const LambdaExpression *a, const LambdaExpression *b);
21223
- hash_t Hash() const override;
21215
+ static bool Equals(const BetweenExpression *a, const BetweenExpression *b);
21224
21216
 
21225
21217
  unique_ptr<ParsedExpression> Copy() const override;
21226
21218
 
21227
21219
  void Serialize(FieldWriter &writer) const override;
21228
21220
  static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21229
21221
  };
21230
-
21231
21222
  } // namespace duckdb
21232
21223
  //===----------------------------------------------------------------------===//
21233
21224
  // DuckDB
21234
21225
  //
21235
- // duckdb/parser/expression/positional_reference_expression.hpp
21226
+ // duckdb/parser/expression/parameter_expression.hpp
21236
21227
  //
21237
21228
  //
21238
21229
  //===----------------------------------------------------------------------===//
@@ -21242,20 +21233,22 @@ public:
21242
21233
 
21243
21234
 
21244
21235
  namespace duckdb {
21245
- class PositionalReferenceExpression : public ParsedExpression {
21236
+ class ParameterExpression : public ParsedExpression {
21246
21237
  public:
21247
- PositionalReferenceExpression(idx_t index);
21238
+ ParameterExpression();
21248
21239
 
21249
- idx_t index;
21240
+ idx_t parameter_nr;
21250
21241
 
21251
21242
  public:
21252
21243
  bool IsScalar() const override {
21253
- return false;
21244
+ return true;
21245
+ }
21246
+ bool HasParameter() const override {
21247
+ return true;
21254
21248
  }
21255
21249
 
21256
21250
  string ToString() const override;
21257
21251
 
21258
- static bool Equals(const PositionalReferenceExpression *a, const PositionalReferenceExpression *b);
21259
21252
  unique_ptr<ParsedExpression> Copy() const override;
21260
21253
  hash_t Hash() const override;
21261
21254
 
@@ -21266,6 +21259,44 @@ public:
21266
21259
  //===----------------------------------------------------------------------===//
21267
21260
  // DuckDB
21268
21261
  //
21262
+ // duckdb/parser/expression/star_expression.hpp
21263
+ //
21264
+ //
21265
+ //===----------------------------------------------------------------------===//
21266
+
21267
+
21268
+
21269
+
21270
+
21271
+
21272
+ namespace duckdb {
21273
+
21274
+ //! Represents a * expression in the SELECT clause
21275
+ class StarExpression : public ParsedExpression {
21276
+ public:
21277
+ StarExpression(string relation_name = string());
21278
+
21279
+ //! The relation name in case of tbl.*, or empty if this is a normal *
21280
+ string relation_name;
21281
+ //! List of columns to exclude from the STAR expression
21282
+ case_insensitive_set_t exclude_list;
21283
+ //! List of columns to replace with another expression
21284
+ case_insensitive_map_t<unique_ptr<ParsedExpression>> replace_list;
21285
+
21286
+ public:
21287
+ string ToString() const override;
21288
+
21289
+ static bool Equals(const StarExpression *a, const StarExpression *b);
21290
+
21291
+ unique_ptr<ParsedExpression> Copy() const override;
21292
+
21293
+ void Serialize(FieldWriter &writer) const override;
21294
+ static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21295
+ };
21296
+ } // namespace duckdb
21297
+ //===----------------------------------------------------------------------===//
21298
+ // DuckDB
21299
+ //
21269
21300
  // duckdb/parser/expression/case_expression.hpp
21270
21301
  //
21271
21302
  //
@@ -21305,7 +21336,7 @@ public:
21305
21336
  //===----------------------------------------------------------------------===//
21306
21337
  // DuckDB
21307
21338
  //
21308
- // duckdb/parser/expression/between_expression.hpp
21339
+ // duckdb/parser/expression/cast_expression.hpp
21309
21340
  //
21310
21341
  //
21311
21342
  //===----------------------------------------------------------------------===//
@@ -21314,21 +21345,25 @@ public:
21314
21345
 
21315
21346
 
21316
21347
 
21348
+
21317
21349
  namespace duckdb {
21318
21350
 
21319
- class BetweenExpression : public ParsedExpression {
21351
+ //! CastExpression represents a type cast from one SQL type to another SQL type
21352
+ class CastExpression : public ParsedExpression {
21320
21353
  public:
21321
- BetweenExpression(unique_ptr<ParsedExpression> input, unique_ptr<ParsedExpression> lower,
21322
- unique_ptr<ParsedExpression> upper);
21354
+ CastExpression(LogicalType target, unique_ptr<ParsedExpression> child, bool try_cast = false);
21323
21355
 
21324
- unique_ptr<ParsedExpression> input;
21325
- unique_ptr<ParsedExpression> lower;
21326
- unique_ptr<ParsedExpression> upper;
21356
+ //! The child of the cast expression
21357
+ unique_ptr<ParsedExpression> child;
21358
+ //! The type to cast to
21359
+ LogicalType cast_type;
21360
+ //! Whether or not this is a try_cast expression
21361
+ bool try_cast;
21327
21362
 
21328
21363
  public:
21329
21364
  string ToString() const override;
21330
21365
 
21331
- static bool Equals(const BetweenExpression *a, const BetweenExpression *b);
21366
+ static bool Equals(const CastExpression *a, const CastExpression *b);
21332
21367
 
21333
21368
  unique_ptr<ParsedExpression> Copy() const override;
21334
21369
 
@@ -21339,7 +21374,7 @@ public:
21339
21374
  //===----------------------------------------------------------------------===//
21340
21375
  // DuckDB
21341
21376
  //
21342
- // duckdb/parser/expression/comparison_expression.hpp
21377
+ // duckdb/parser/expression/positional_reference_expression.hpp
21343
21378
  //
21344
21379
  //
21345
21380
  //===----------------------------------------------------------------------===//
@@ -21349,21 +21384,22 @@ public:
21349
21384
 
21350
21385
 
21351
21386
  namespace duckdb {
21352
- //! ComparisonExpression represents a boolean comparison (e.g. =, >=, <>). Always returns a boolean
21353
- //! and has two children.
21354
- class ComparisonExpression : public ParsedExpression {
21387
+ class PositionalReferenceExpression : public ParsedExpression {
21355
21388
  public:
21356
- ComparisonExpression(ExpressionType type, unique_ptr<ParsedExpression> left, unique_ptr<ParsedExpression> right);
21389
+ PositionalReferenceExpression(idx_t index);
21357
21390
 
21358
- unique_ptr<ParsedExpression> left;
21359
- unique_ptr<ParsedExpression> right;
21391
+ idx_t index;
21360
21392
 
21361
21393
  public:
21362
- string ToString() const override;
21394
+ bool IsScalar() const override {
21395
+ return false;
21396
+ }
21363
21397
 
21364
- static bool Equals(const ComparisonExpression *a, const ComparisonExpression *b);
21398
+ string ToString() const override;
21365
21399
 
21400
+ static bool Equals(const PositionalReferenceExpression *a, const PositionalReferenceExpression *b);
21366
21401
  unique_ptr<ParsedExpression> Copy() const override;
21402
+ hash_t Hash() const override;
21367
21403
 
21368
21404
  void Serialize(FieldWriter &writer) const override;
21369
21405
  static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
@@ -21372,7 +21408,7 @@ public:
21372
21408
  //===----------------------------------------------------------------------===//
21373
21409
  // DuckDB
21374
21410
  //
21375
- // duckdb/parser/expression/cast_expression.hpp
21411
+ // duckdb/parser/expression/lambda_expression.hpp
21376
21412
  //
21377
21413
  //
21378
21414
  //===----------------------------------------------------------------------===//
@@ -21384,33 +21420,67 @@ public:
21384
21420
 
21385
21421
  namespace duckdb {
21386
21422
 
21387
- //! CastExpression represents a type cast from one SQL type to another SQL type
21388
- class CastExpression : public ParsedExpression {
21423
+ //! LambdaExpression represents a lambda operator that can be used for e.g. mapping an expression to a list
21424
+ //! Lambda expressions are written in the form of "capture -> expr", e.g. "x -> x + 1"
21425
+ class LambdaExpression : public ParsedExpression {
21389
21426
  public:
21390
- CastExpression(LogicalType target, unique_ptr<ParsedExpression> child, bool try_cast = false);
21427
+ LambdaExpression(vector<string> parameters, unique_ptr<ParsedExpression> expression);
21391
21428
 
21392
- //! The child of the cast expression
21393
- unique_ptr<ParsedExpression> child;
21394
- //! The type to cast to
21395
- LogicalType cast_type;
21396
- //! Whether or not this is a try_cast expression
21397
- bool try_cast;
21429
+ vector<string> parameters;
21430
+ unique_ptr<ParsedExpression> expression;
21398
21431
 
21399
21432
  public:
21400
21433
  string ToString() const override;
21401
21434
 
21402
- static bool Equals(const CastExpression *a, const CastExpression *b);
21435
+ static bool Equals(const LambdaExpression *a, const LambdaExpression *b);
21436
+ hash_t Hash() const override;
21403
21437
 
21404
21438
  unique_ptr<ParsedExpression> Copy() const override;
21405
21439
 
21406
21440
  void Serialize(FieldWriter &writer) const override;
21407
21441
  static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21408
21442
  };
21443
+
21409
21444
  } // namespace duckdb
21410
21445
 
21411
21446
 
21412
21447
 
21413
21448
 
21449
+ //===----------------------------------------------------------------------===//
21450
+ // DuckDB
21451
+ //
21452
+ // duckdb/parser/expression/collate_expression.hpp
21453
+ //
21454
+ //
21455
+ //===----------------------------------------------------------------------===//
21456
+
21457
+
21458
+
21459
+
21460
+
21461
+ namespace duckdb {
21462
+
21463
+ //! CollateExpression represents a COLLATE statement
21464
+ class CollateExpression : public ParsedExpression {
21465
+ public:
21466
+ CollateExpression(string collation, unique_ptr<ParsedExpression> child);
21467
+
21468
+ //! The child of the cast expression
21469
+ unique_ptr<ParsedExpression> child;
21470
+ //! The collation clause
21471
+ string collation;
21472
+
21473
+ public:
21474
+ string ToString() const override;
21475
+
21476
+ static bool Equals(const CollateExpression *a, const CollateExpression *b);
21477
+
21478
+ unique_ptr<ParsedExpression> Copy() const override;
21479
+
21480
+ void Serialize(FieldWriter &writer) const override;
21481
+ static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21482
+ };
21483
+ } // namespace duckdb
21414
21484
 
21415
21485
 
21416
21486
 
@@ -21502,10 +21572,16 @@ public:
21502
21572
  } // namespace duckdb
21503
21573
 
21504
21574
 
21575
+
21576
+
21577
+
21578
+
21579
+
21580
+
21505
21581
  //===----------------------------------------------------------------------===//
21506
21582
  // DuckDB
21507
21583
  //
21508
- // duckdb/parser/expression/operator_expression.hpp
21584
+ // duckdb/parser/parsed_data/create_pragma_function_info.hpp
21509
21585
  //
21510
21586
  //
21511
21587
  //===----------------------------------------------------------------------===//
@@ -21516,101 +21592,27 @@ public:
21516
21592
 
21517
21593
 
21518
21594
  namespace duckdb {
21519
- //! Represents a built-in operator expression
21520
- class OperatorExpression : public ParsedExpression {
21521
- public:
21522
- explicit OperatorExpression(ExpressionType type, unique_ptr<ParsedExpression> left = nullptr,
21523
- unique_ptr<ParsedExpression> right = nullptr);
21524
- OperatorExpression(ExpressionType type, vector<unique_ptr<ParsedExpression>> children);
21525
-
21526
- vector<unique_ptr<ParsedExpression>> children;
21527
-
21528
- public:
21529
- string ToString() const override;
21530
-
21531
- static bool Equals(const OperatorExpression *a, const OperatorExpression *b);
21532
21595
 
21533
- unique_ptr<ParsedExpression> Copy() const override;
21534
-
21535
- void Serialize(FieldWriter &writer) const override;
21536
- static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21537
- };
21538
- } // namespace duckdb
21539
-
21540
- //===----------------------------------------------------------------------===//
21541
- // DuckDB
21542
- //
21543
- // duckdb/parser/expression/parameter_expression.hpp
21544
- //
21545
- //
21546
- //===----------------------------------------------------------------------===//
21547
-
21548
-
21549
-
21550
-
21551
-
21552
- namespace duckdb {
21553
- class ParameterExpression : public ParsedExpression {
21554
- public:
21555
- ParameterExpression();
21556
-
21557
- idx_t parameter_nr;
21558
-
21559
- public:
21560
- bool IsScalar() const override {
21561
- return true;
21562
- }
21563
- bool HasParameter() const override {
21564
- return true;
21596
+ struct CreatePragmaFunctionInfo : public CreateFunctionInfo {
21597
+ explicit CreatePragmaFunctionInfo(PragmaFunction function)
21598
+ : CreateFunctionInfo(CatalogType::PRAGMA_FUNCTION_ENTRY) {
21599
+ functions.push_back(move(function));
21600
+ this->name = function.name;
21565
21601
  }
21566
-
21567
- string ToString() const override;
21568
-
21569
- unique_ptr<ParsedExpression> Copy() const override;
21570
- hash_t Hash() const override;
21571
-
21572
- void Serialize(FieldWriter &writer) const override;
21573
- static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
21574
- };
21575
- } // namespace duckdb
21576
-
21577
-
21578
-
21579
-
21580
-
21581
- //===----------------------------------------------------------------------===//
21582
- // DuckDB
21583
- //
21584
- // duckdb/parser/parsed_data/create_type_info.hpp
21585
- //
21586
- //
21587
- //===----------------------------------------------------------------------===//
21588
-
21589
-
21590
-
21591
-
21592
-
21593
-
21594
-
21595
-
21596
- namespace duckdb {
21597
-
21598
- struct CreateTypeInfo : public CreateInfo {
21599
-
21600
- CreateTypeInfo() : CreateInfo(CatalogType::TYPE_ENTRY) {
21602
+ CreatePragmaFunctionInfo(string name, vector<PragmaFunction> functions_)
21603
+ : CreateFunctionInfo(CatalogType::PRAGMA_FUNCTION_ENTRY), functions(move(functions_)) {
21604
+ this->name = name;
21605
+ for (auto &function : functions) {
21606
+ function.name = name;
21607
+ }
21601
21608
  }
21602
21609
 
21603
- //! Name of the Type
21604
- string name;
21605
- //! Logical Type
21606
- LogicalType type;
21610
+ vector<PragmaFunction> functions;
21607
21611
 
21608
21612
  public:
21609
21613
  unique_ptr<CreateInfo> Copy() const override {
21610
- auto result = make_unique<CreateTypeInfo>();
21614
+ auto result = make_unique<CreatePragmaFunctionInfo>(functions[0].name, functions);
21611
21615
  CopyProperties(*result);
21612
- result->name = name;
21613
- result->type = type;
21614
21616
  return move(result);
21615
21617
  }
21616
21618
  };
@@ -21619,7 +21621,7 @@ public:
21619
21621
  //===----------------------------------------------------------------------===//
21620
21622
  // DuckDB
21621
21623
  //
21622
- // duckdb/parser/parsed_data/vacuum_info.hpp
21624
+ // duckdb/parser/parsed_data/create_collation_info.hpp
21623
21625
  //
21624
21626
  //
21625
21627
  //===----------------------------------------------------------------------===//
@@ -21628,20 +21630,32 @@ public:
21628
21630
 
21629
21631
 
21630
21632
 
21633
+
21631
21634
  namespace duckdb {
21632
21635
 
21633
- enum class LoadType { LOAD, INSTALL, FORCE_INSTALL };
21636
+ struct CreateCollationInfo : public CreateInfo {
21637
+ CreateCollationInfo(string name_p, ScalarFunction function_p, bool combinable_p, bool not_required_for_equality_p)
21638
+ : CreateInfo(CatalogType::COLLATION_ENTRY), function(move(function_p)), combinable(combinable_p),
21639
+ not_required_for_equality(not_required_for_equality_p) {
21640
+ this->name = move(name_p);
21641
+ }
21634
21642
 
21635
- struct LoadInfo : public ParseInfo {
21636
- std::string filename;
21637
- LoadType load_type;
21643
+ //! The name of the collation
21644
+ string name;
21645
+ //! The collation function to push in case collation is required
21646
+ ScalarFunction function;
21647
+ //! Whether or not the collation can be combined with other collations.
21648
+ bool combinable;
21649
+ //! Whether or not the collation is required for equality comparisons or not. For many collations a binary
21650
+ //! comparison for equality comparisons is correct, allowing us to skip the collation in these cases which greatly
21651
+ //! speeds up processing.
21652
+ bool not_required_for_equality;
21638
21653
 
21639
21654
  public:
21640
- unique_ptr<LoadInfo> Copy() const {
21641
- auto result = make_unique<LoadInfo>();
21642
- result->filename = filename;
21643
- result->load_type = load_type;
21644
- return result;
21655
+ unique_ptr<CreateInfo> Copy() const override {
21656
+ auto result = make_unique<CreateCollationInfo>(name, function, combinable, not_required_for_equality);
21657
+ CopyProperties(*result);
21658
+ return move(result);
21645
21659
  }
21646
21660
  };
21647
21661
 
@@ -21649,57 +21663,7 @@ public:
21649
21663
  //===----------------------------------------------------------------------===//
21650
21664
  // DuckDB
21651
21665
  //
21652
- // duckdb/parser/parsed_data/export_table_data.hpp
21653
- //
21654
- //
21655
- //===----------------------------------------------------------------------===//
21656
-
21657
-
21658
-
21659
-
21660
-
21661
-
21662
- namespace duckdb {
21663
-
21664
- struct ExportedTableData {
21665
- //! Name of the exported table
21666
- string table_name;
21667
-
21668
- //! Name of the schema
21669
- string schema_name;
21670
-
21671
- //! Path to be exported
21672
- string file_path;
21673
- };
21674
-
21675
- struct BoundExportData : public ParseInfo {
21676
- unordered_map<TableCatalogEntry *, ExportedTableData> data;
21677
- };
21678
-
21679
- } // namespace duckdb
21680
- //===----------------------------------------------------------------------===//
21681
- // DuckDB
21682
- //
21683
- // duckdb/parser/parsed_data/vacuum_info.hpp
21684
- //
21685
- //
21686
- //===----------------------------------------------------------------------===//
21687
-
21688
-
21689
-
21690
-
21691
-
21692
- namespace duckdb {
21693
-
21694
- struct VacuumInfo : public ParseInfo {
21695
- // nothing for now
21696
- };
21697
-
21698
- } // namespace duckdb
21699
- //===----------------------------------------------------------------------===//
21700
- // DuckDB
21701
- //
21702
- // duckdb/parser/parsed_data/create_collation_info.hpp
21666
+ // duckdb/parser/parsed_data/create_schema_info.hpp
21703
21667
  //
21704
21668
  //
21705
21669
  //===----------------------------------------------------------------------===//
@@ -21708,30 +21672,15 @@ struct VacuumInfo : public ParseInfo {
21708
21672
 
21709
21673
 
21710
21674
 
21711
-
21712
21675
  namespace duckdb {
21713
21676
 
21714
- struct CreateCollationInfo : public CreateInfo {
21715
- CreateCollationInfo(string name_p, ScalarFunction function_p, bool combinable_p, bool not_required_for_equality_p)
21716
- : CreateInfo(CatalogType::COLLATION_ENTRY), function(move(function_p)), combinable(combinable_p),
21717
- not_required_for_equality(not_required_for_equality_p) {
21718
- this->name = move(name_p);
21677
+ struct CreateSchemaInfo : public CreateInfo {
21678
+ CreateSchemaInfo() : CreateInfo(CatalogType::SCHEMA_ENTRY) {
21719
21679
  }
21720
21680
 
21721
- //! The name of the collation
21722
- string name;
21723
- //! The collation function to push in case collation is required
21724
- ScalarFunction function;
21725
- //! Whether or not the collation can be combined with other collations.
21726
- bool combinable;
21727
- //! Whether or not the collation is required for equality comparisons or not. For many collations a binary
21728
- //! comparison for equality comparisons is correct, allowing us to skip the collation in these cases which greatly
21729
- //! speeds up processing.
21730
- bool not_required_for_equality;
21731
-
21732
21681
  public:
21733
21682
  unique_ptr<CreateInfo> Copy() const override {
21734
- auto result = make_unique<CreateCollationInfo>(name, function, combinable, not_required_for_equality);
21683
+ auto result = make_unique<CreateSchemaInfo>();
21735
21684
  CopyProperties(*result);
21736
21685
  return move(result);
21737
21686
  }
@@ -21785,7 +21734,32 @@ public:
21785
21734
  //===----------------------------------------------------------------------===//
21786
21735
  // DuckDB
21787
21736
  //
21788
- // duckdb/parser/parsed_data/create_view_info.hpp
21737
+ // duckdb/parser/parsed_data/transaction_info.hpp
21738
+ //
21739
+ //
21740
+ //===----------------------------------------------------------------------===//
21741
+
21742
+
21743
+
21744
+
21745
+
21746
+ namespace duckdb {
21747
+
21748
+ enum class TransactionType : uint8_t { INVALID, BEGIN_TRANSACTION, COMMIT, ROLLBACK };
21749
+
21750
+ struct TransactionInfo : public ParseInfo {
21751
+ explicit TransactionInfo(TransactionType type) : type(type) {
21752
+ }
21753
+
21754
+ //! The type of transaction statement
21755
+ TransactionType type;
21756
+ };
21757
+
21758
+ } // namespace duckdb
21759
+ //===----------------------------------------------------------------------===//
21760
+ // DuckDB
21761
+ //
21762
+ // duckdb/parser/parsed_data/create_aggregate_function_info.hpp
21789
21763
  //
21790
21764
  //
21791
21765
  //===----------------------------------------------------------------------===//
@@ -21797,29 +21771,27 @@ public:
21797
21771
 
21798
21772
  namespace duckdb {
21799
21773
 
21800
- struct CreateViewInfo : public CreateInfo {
21801
- CreateViewInfo() : CreateInfo(CatalogType::VIEW_ENTRY, INVALID_SCHEMA) {
21774
+ struct CreateAggregateFunctionInfo : public CreateFunctionInfo {
21775
+ explicit CreateAggregateFunctionInfo(AggregateFunction function)
21776
+ : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(function.name) {
21777
+ this->name = function.name;
21778
+ functions.AddFunction(move(function));
21802
21779
  }
21803
- CreateViewInfo(string schema, string view_name)
21804
- : CreateInfo(CatalogType::VIEW_ENTRY, schema), view_name(view_name) {
21780
+
21781
+ explicit CreateAggregateFunctionInfo(AggregateFunctionSet set)
21782
+ : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(move(set)) {
21783
+ this->name = functions.name;
21784
+ for (auto &func : functions.functions) {
21785
+ func.name = functions.name;
21786
+ }
21805
21787
  }
21806
21788
 
21807
- //! Table name to insert to
21808
- string view_name;
21809
- //! Aliases of the view
21810
- vector<string> aliases;
21811
- //! Return types
21812
- vector<LogicalType> types;
21813
- //! The SelectStatement of the view
21814
- unique_ptr<SelectStatement> query;
21789
+ AggregateFunctionSet functions;
21815
21790
 
21816
21791
  public:
21817
21792
  unique_ptr<CreateInfo> Copy() const override {
21818
- auto result = make_unique<CreateViewInfo>(schema, view_name);
21793
+ auto result = make_unique<CreateAggregateFunctionInfo>(functions);
21819
21794
  CopyProperties(*result);
21820
- result->aliases = aliases;
21821
- result->types = types;
21822
- result->query = unique_ptr_cast<SQLStatement, SelectStatement>(query->Copy());
21823
21795
  return move(result);
21824
21796
  }
21825
21797
  };
@@ -21893,109 +21865,21 @@ struct CreateIndexInfo : public CreateInfo {
21893
21865
  //! If it is an unique index
21894
21866
  bool unique = false;
21895
21867
  //! The table to create the index on
21896
- unique_ptr<BaseTableRef> table;
21897
- //! Set of expressions to index by
21898
- vector<unique_ptr<ParsedExpression>> expressions;
21899
-
21900
- public:
21901
- unique_ptr<CreateInfo> Copy() const override {
21902
- auto result = make_unique<CreateIndexInfo>();
21903
- CopyProperties(*result);
21904
- result->index_type = index_type;
21905
- result->index_name = index_name;
21906
- result->unique = unique;
21907
- result->table = unique_ptr_cast<TableRef, BaseTableRef>(table->Copy());
21908
- for (auto &expr : expressions) {
21909
- result->expressions.push_back(expr->Copy());
21910
- }
21911
- return move(result);
21912
- }
21913
- };
21914
-
21915
- } // namespace duckdb
21916
- //===----------------------------------------------------------------------===//
21917
- // DuckDB
21918
- //
21919
- // duckdb/parser/parsed_data/show_select_info.hpp
21920
- //
21921
- //
21922
- //===----------------------------------------------------------------------===//
21923
-
21924
-
21925
-
21926
-
21927
-
21928
-
21929
- namespace duckdb {
21930
-
21931
- struct ShowSelectInfo : public ParseInfo {
21932
- //! Types of projected columns
21933
- vector<LogicalType> types;
21934
- //! The QueryNode of select query
21935
- unique_ptr<QueryNode> query;
21936
- //! Aliases of projected columns
21937
- vector<string> aliases;
21938
- //! Whether or not we are requesting a summary or a describe
21939
- bool is_summary;
21940
-
21941
- unique_ptr<ShowSelectInfo> Copy() {
21942
- auto result = make_unique<ShowSelectInfo>();
21943
- result->types = types;
21944
- result->query = query->Copy();
21945
- result->aliases = aliases;
21946
- result->is_summary = is_summary;
21947
- return result;
21948
- }
21949
- };
21950
-
21951
- } // namespace duckdb
21952
- //===----------------------------------------------------------------------===//
21953
- // DuckDB
21954
- //
21955
- // duckdb/parser/parsed_data/transaction_info.hpp
21956
- //
21957
- //
21958
- //===----------------------------------------------------------------------===//
21959
-
21960
-
21961
-
21962
-
21963
-
21964
- namespace duckdb {
21965
-
21966
- enum class TransactionType : uint8_t { INVALID, BEGIN_TRANSACTION, COMMIT, ROLLBACK };
21967
-
21968
- struct TransactionInfo : public ParseInfo {
21969
- explicit TransactionInfo(TransactionType type) : type(type) {
21970
- }
21971
-
21972
- //! The type of transaction statement
21973
- TransactionType type;
21974
- };
21975
-
21976
- } // namespace duckdb
21977
- //===----------------------------------------------------------------------===//
21978
- // DuckDB
21979
- //
21980
- // duckdb/parser/parsed_data/create_schema_info.hpp
21981
- //
21982
- //
21983
- //===----------------------------------------------------------------------===//
21984
-
21985
-
21986
-
21987
-
21988
-
21989
- namespace duckdb {
21990
-
21991
- struct CreateSchemaInfo : public CreateInfo {
21992
- CreateSchemaInfo() : CreateInfo(CatalogType::SCHEMA_ENTRY) {
21993
- }
21868
+ unique_ptr<BaseTableRef> table;
21869
+ //! Set of expressions to index by
21870
+ vector<unique_ptr<ParsedExpression>> expressions;
21994
21871
 
21995
21872
  public:
21996
21873
  unique_ptr<CreateInfo> Copy() const override {
21997
- auto result = make_unique<CreateSchemaInfo>();
21874
+ auto result = make_unique<CreateIndexInfo>();
21998
21875
  CopyProperties(*result);
21876
+ result->index_type = index_type;
21877
+ result->index_name = index_name;
21878
+ result->unique = unique;
21879
+ result->table = unique_ptr_cast<TableRef, BaseTableRef>(table->Copy());
21880
+ for (auto &expr : expressions) {
21881
+ result->expressions.push_back(expr->Copy());
21882
+ }
21999
21883
  return move(result);
22000
21884
  }
22001
21885
  };
@@ -22004,7 +21888,7 @@ public:
22004
21888
  //===----------------------------------------------------------------------===//
22005
21889
  // DuckDB
22006
21890
  //
22007
- // duckdb/parser/parsed_data/create_pragma_function_info.hpp
21891
+ // duckdb/parser/parsed_data/show_select_info.hpp
22008
21892
  //
22009
21893
  //
22010
21894
  //===----------------------------------------------------------------------===//
@@ -22016,27 +21900,23 @@ public:
22016
21900
 
22017
21901
  namespace duckdb {
22018
21902
 
22019
- struct CreatePragmaFunctionInfo : public CreateFunctionInfo {
22020
- explicit CreatePragmaFunctionInfo(PragmaFunction function)
22021
- : CreateFunctionInfo(CatalogType::PRAGMA_FUNCTION_ENTRY) {
22022
- functions.push_back(move(function));
22023
- this->name = function.name;
22024
- }
22025
- CreatePragmaFunctionInfo(string name, vector<PragmaFunction> functions_)
22026
- : CreateFunctionInfo(CatalogType::PRAGMA_FUNCTION_ENTRY), functions(move(functions_)) {
22027
- this->name = name;
22028
- for (auto &function : functions) {
22029
- function.name = name;
22030
- }
22031
- }
22032
-
22033
- vector<PragmaFunction> functions;
21903
+ struct ShowSelectInfo : public ParseInfo {
21904
+ //! Types of projected columns
21905
+ vector<LogicalType> types;
21906
+ //! The QueryNode of select query
21907
+ unique_ptr<QueryNode> query;
21908
+ //! Aliases of projected columns
21909
+ vector<string> aliases;
21910
+ //! Whether or not we are requesting a summary or a describe
21911
+ bool is_summary;
22034
21912
 
22035
- public:
22036
- unique_ptr<CreateInfo> Copy() const override {
22037
- auto result = make_unique<CreatePragmaFunctionInfo>(functions[0].name, functions);
22038
- CopyProperties(*result);
22039
- return move(result);
21913
+ unique_ptr<ShowSelectInfo> Copy() {
21914
+ auto result = make_unique<ShowSelectInfo>();
21915
+ result->types = types;
21916
+ result->query = query->Copy();
21917
+ result->aliases = aliases;
21918
+ result->is_summary = is_summary;
21919
+ return result;
22040
21920
  }
22041
21921
  };
22042
21922
 
@@ -22044,7 +21924,7 @@ public:
22044
21924
  //===----------------------------------------------------------------------===//
22045
21925
  // DuckDB
22046
21926
  //
22047
- // duckdb/parser/parsed_data/create_aggregate_function_info.hpp
21927
+ // duckdb/parser/parsed_data/create_type_info.hpp
22048
21928
  //
22049
21929
  //
22050
21930
  //===----------------------------------------------------------------------===//
@@ -22054,29 +21934,26 @@ public:
22054
21934
 
22055
21935
 
22056
21936
 
21937
+
21938
+
22057
21939
  namespace duckdb {
22058
21940
 
22059
- struct CreateAggregateFunctionInfo : public CreateFunctionInfo {
22060
- explicit CreateAggregateFunctionInfo(AggregateFunction function)
22061
- : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(function.name) {
22062
- this->name = function.name;
22063
- functions.AddFunction(move(function));
22064
- }
21941
+ struct CreateTypeInfo : public CreateInfo {
22065
21942
 
22066
- explicit CreateAggregateFunctionInfo(AggregateFunctionSet set)
22067
- : CreateFunctionInfo(CatalogType::AGGREGATE_FUNCTION_ENTRY), functions(move(set)) {
22068
- this->name = functions.name;
22069
- for (auto &func : functions.functions) {
22070
- func.name = functions.name;
22071
- }
21943
+ CreateTypeInfo() : CreateInfo(CatalogType::TYPE_ENTRY) {
22072
21944
  }
22073
21945
 
22074
- AggregateFunctionSet functions;
21946
+ //! Name of the Type
21947
+ string name;
21948
+ //! Logical Type
21949
+ LogicalType type;
22075
21950
 
22076
21951
  public:
22077
21952
  unique_ptr<CreateInfo> Copy() const override {
22078
- auto result = make_unique<CreateAggregateFunctionInfo>(functions);
21953
+ auto result = make_unique<CreateTypeInfo>();
22079
21954
  CopyProperties(*result);
21955
+ result->name = name;
21956
+ result->type = type;
22080
21957
  return move(result);
22081
21958
  }
22082
21959
  };
@@ -22152,6 +22029,129 @@ public:
22152
22029
  }
22153
22030
  };
22154
22031
 
22032
+ } // namespace duckdb
22033
+ //===----------------------------------------------------------------------===//
22034
+ // DuckDB
22035
+ //
22036
+ // duckdb/parser/parsed_data/export_table_data.hpp
22037
+ //
22038
+ //
22039
+ //===----------------------------------------------------------------------===//
22040
+
22041
+
22042
+
22043
+
22044
+
22045
+
22046
+ namespace duckdb {
22047
+
22048
+ struct ExportedTableData {
22049
+ //! Name of the exported table
22050
+ string table_name;
22051
+
22052
+ //! Name of the schema
22053
+ string schema_name;
22054
+
22055
+ //! Path to be exported
22056
+ string file_path;
22057
+ };
22058
+
22059
+ struct BoundExportData : public ParseInfo {
22060
+ unordered_map<TableCatalogEntry *, ExportedTableData> data;
22061
+ };
22062
+
22063
+ } // namespace duckdb
22064
+ //===----------------------------------------------------------------------===//
22065
+ // DuckDB
22066
+ //
22067
+ // duckdb/parser/parsed_data/vacuum_info.hpp
22068
+ //
22069
+ //
22070
+ //===----------------------------------------------------------------------===//
22071
+
22072
+
22073
+
22074
+
22075
+
22076
+ namespace duckdb {
22077
+
22078
+ struct VacuumInfo : public ParseInfo {
22079
+ // nothing for now
22080
+ };
22081
+
22082
+ } // namespace duckdb
22083
+ //===----------------------------------------------------------------------===//
22084
+ // DuckDB
22085
+ //
22086
+ // duckdb/parser/parsed_data/create_view_info.hpp
22087
+ //
22088
+ //
22089
+ //===----------------------------------------------------------------------===//
22090
+
22091
+
22092
+
22093
+
22094
+
22095
+
22096
+ namespace duckdb {
22097
+
22098
+ struct CreateViewInfo : public CreateInfo {
22099
+ CreateViewInfo() : CreateInfo(CatalogType::VIEW_ENTRY, INVALID_SCHEMA) {
22100
+ }
22101
+ CreateViewInfo(string schema, string view_name)
22102
+ : CreateInfo(CatalogType::VIEW_ENTRY, schema), view_name(view_name) {
22103
+ }
22104
+
22105
+ //! Table name to insert to
22106
+ string view_name;
22107
+ //! Aliases of the view
22108
+ vector<string> aliases;
22109
+ //! Return types
22110
+ vector<LogicalType> types;
22111
+ //! The SelectStatement of the view
22112
+ unique_ptr<SelectStatement> query;
22113
+
22114
+ public:
22115
+ unique_ptr<CreateInfo> Copy() const override {
22116
+ auto result = make_unique<CreateViewInfo>(schema, view_name);
22117
+ CopyProperties(*result);
22118
+ result->aliases = aliases;
22119
+ result->types = types;
22120
+ result->query = unique_ptr_cast<SQLStatement, SelectStatement>(query->Copy());
22121
+ return move(result);
22122
+ }
22123
+ };
22124
+
22125
+ } // namespace duckdb
22126
+ //===----------------------------------------------------------------------===//
22127
+ // DuckDB
22128
+ //
22129
+ // duckdb/parser/parsed_data/vacuum_info.hpp
22130
+ //
22131
+ //
22132
+ //===----------------------------------------------------------------------===//
22133
+
22134
+
22135
+
22136
+
22137
+
22138
+ namespace duckdb {
22139
+
22140
+ enum class LoadType { LOAD, INSTALL, FORCE_INSTALL };
22141
+
22142
+ struct LoadInfo : public ParseInfo {
22143
+ std::string filename;
22144
+ LoadType load_type;
22145
+
22146
+ public:
22147
+ unique_ptr<LoadInfo> Copy() const {
22148
+ auto result = make_unique<LoadInfo>();
22149
+ result->filename = filename;
22150
+ result->load_type = load_type;
22151
+ return result;
22152
+ }
22153
+ };
22154
+
22155
22155
  } // namespace duckdb
22156
22156
  //===----------------------------------------------------------------------===//
22157
22157
  // DuckDB
@@ -22270,10 +22270,12 @@ public:
22270
22270
  static unique_ptr<TableRef> Deserialize(FieldReader &source);
22271
22271
  };
22272
22272
  } // namespace duckdb
22273
+
22274
+
22273
22275
  //===----------------------------------------------------------------------===//
22274
22276
  // DuckDB
22275
22277
  //
22276
- // duckdb/parser/tableref/expressionlistref.hpp
22278
+ // duckdb/parser/tableref/emptytableref.hpp
22277
22279
  //
22278
22280
  //
22279
22281
  //===----------------------------------------------------------------------===//
@@ -22282,38 +22284,29 @@ public:
22282
22284
 
22283
22285
 
22284
22286
 
22285
-
22286
-
22287
-
22288
22287
  namespace duckdb {
22289
- //! Represents an expression list as generated by a VALUES statement
22290
- class ExpressionListRef : public TableRef {
22288
+ //! Represents a cross product
22289
+ class EmptyTableRef : public TableRef {
22291
22290
  public:
22292
- ExpressionListRef() : TableRef(TableReferenceType::EXPRESSION_LIST) {
22291
+ EmptyTableRef() : TableRef(TableReferenceType::EMPTY) {
22293
22292
  }
22294
22293
 
22295
- //! Value list, only used for VALUES statement
22296
- vector<vector<unique_ptr<ParsedExpression>>> values;
22297
- //! Expected SQL types
22298
- vector<LogicalType> expected_types;
22299
- //! The set of expected names
22300
- vector<string> expected_names;
22301
-
22302
22294
  public:
22303
22295
  bool Equals(const TableRef *other_p) const override;
22304
22296
 
22305
22297
  unique_ptr<TableRef> Copy() override;
22306
22298
 
22307
- //! Serializes a blob into a ExpressionListRef
22299
+ //! Serializes a blob into a DummyTableRef
22308
22300
  void Serialize(FieldWriter &serializer) const override;
22309
- //! Deserializes a blob back into a ExpressionListRef
22301
+ //! Deserializes a blob back into a DummyTableRef
22310
22302
  static unique_ptr<TableRef> Deserialize(FieldReader &source);
22311
22303
  };
22312
22304
  } // namespace duckdb
22305
+
22313
22306
  //===----------------------------------------------------------------------===//
22314
22307
  // DuckDB
22315
22308
  //
22316
- // duckdb/parser/tableref/emptytableref.hpp
22309
+ // duckdb/parser/tableref/expressionlistref.hpp
22317
22310
  //
22318
22311
  //
22319
22312
  //===----------------------------------------------------------------------===//
@@ -22322,24 +22315,37 @@ public:
22322
22315
 
22323
22316
 
22324
22317
 
22318
+
22319
+
22320
+
22325
22321
  namespace duckdb {
22326
- //! Represents a cross product
22327
- class EmptyTableRef : public TableRef {
22322
+ //! Represents an expression list as generated by a VALUES statement
22323
+ class ExpressionListRef : public TableRef {
22328
22324
  public:
22329
- EmptyTableRef() : TableRef(TableReferenceType::EMPTY) {
22325
+ ExpressionListRef() : TableRef(TableReferenceType::EXPRESSION_LIST) {
22330
22326
  }
22331
22327
 
22328
+ //! Value list, only used for VALUES statement
22329
+ vector<vector<unique_ptr<ParsedExpression>>> values;
22330
+ //! Expected SQL types
22331
+ vector<LogicalType> expected_types;
22332
+ //! The set of expected names
22333
+ vector<string> expected_names;
22334
+
22332
22335
  public:
22333
22336
  bool Equals(const TableRef *other_p) const override;
22334
22337
 
22335
22338
  unique_ptr<TableRef> Copy() override;
22336
22339
 
22337
- //! Serializes a blob into a DummyTableRef
22340
+ //! Serializes a blob into a ExpressionListRef
22338
22341
  void Serialize(FieldWriter &serializer) const override;
22339
- //! Deserializes a blob back into a DummyTableRef
22342
+ //! Deserializes a blob back into a ExpressionListRef
22340
22343
  static unique_ptr<TableRef> Deserialize(FieldReader &source);
22341
22344
  };
22342
22345
  } // namespace duckdb
22346
+
22347
+
22348
+
22343
22349
  //===----------------------------------------------------------------------===//
22344
22350
  // DuckDB
22345
22351
  //
@@ -22382,9 +22388,3 @@ public:
22382
22388
  };
22383
22389
  } // namespace duckdb
22384
22390
 
22385
-
22386
-
22387
-
22388
-
22389
-
22390
-