duckdb 0.8.2-dev1435.0 → 0.8.2-dev1493.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/binding.gyp +1 -0
- package/package.json +1 -1
- package/src/duckdb/src/catalog/catalog_search_path.cpp +5 -4
- package/src/duckdb/src/common/radix_partitioning.cpp +1 -1
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/algebraic_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/distributive_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/holistic_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/nested_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/aggregate/regression_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/bit_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/blob_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/date_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/enum_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/generic_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/map_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/math_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/operators_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/random_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/string_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/struct_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/core_functions/scalar/union_functions.hpp +3 -1
- package/src/duckdb/src/include/duckdb/parser/expression/between_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/cast_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/collate_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/columnref_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/comparison_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/constant_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/default_expression.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/expression/function_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/lambda_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/positional_reference_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/expression/window_expression.hpp +3 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/emptytableref.hpp +1 -0
- package/src/duckdb/src/include/duckdb/parser/tableref/joinref.hpp +1 -1
- package/src/duckdb/src/include/duckdb/parser/tableref/subqueryref.hpp +3 -0
- package/src/duckdb/src/parser/expression/between_expression.cpp +3 -15
- package/src/duckdb/src/parser/expression/case_expression.cpp +0 -13
- package/src/duckdb/src/parser/expression/cast_expression.cpp +3 -14
- package/src/duckdb/src/parser/expression/collate_expression.cpp +3 -13
- package/src/duckdb/src/parser/expression/columnref_expression.cpp +3 -12
- package/src/duckdb/src/parser/expression/comparison_expression.cpp +3 -13
- package/src/duckdb/src/parser/expression/conjunction_expression.cpp +0 -12
- package/src/duckdb/src/parser/expression/constant_expression.cpp +3 -11
- package/src/duckdb/src/parser/expression/default_expression.cpp +0 -4
- package/src/duckdb/src/parser/expression/function_expression.cpp +3 -32
- package/src/duckdb/src/parser/expression/lambda_expression.cpp +3 -13
- package/src/duckdb/src/parser/expression/operator_expression.cpp +0 -12
- package/src/duckdb/src/parser/expression/parameter_expression.cpp +0 -12
- package/src/duckdb/src/parser/expression/positional_reference_expression.cpp +4 -11
- package/src/duckdb/src/parser/expression/star_expression.cpp +0 -19
- package/src/duckdb/src/parser/expression/subquery_expression.cpp +0 -18
- package/src/duckdb/src/parser/expression/window_expression.cpp +3 -39
- package/src/duckdb/src/parser/parsed_expression.cpp +0 -70
- package/src/duckdb/src/parser/query_node/cte_node.cpp +0 -17
- package/src/duckdb/src/parser/query_node/recursive_cte_node.cpp +0 -19
- package/src/duckdb/src/parser/query_node/select_node.cpp +0 -29
- package/src/duckdb/src/parser/query_node/set_operation_node.cpp +0 -15
- package/src/duckdb/src/parser/query_node.cpp +0 -39
- package/src/duckdb/src/parser/result_modifier.cpp +0 -74
- package/src/duckdb/src/parser/tableref/basetableref.cpp +0 -19
- package/src/duckdb/src/parser/tableref/emptytableref.cpp +0 -4
- package/src/duckdb/src/parser/tableref/expressionlistref.cpp +0 -15
- package/src/duckdb/src/parser/tableref/joinref.cpp +0 -23
- package/src/duckdb/src/parser/tableref/pivotref.cpp +0 -23
- package/src/duckdb/src/parser/tableref/subqueryref.cpp +3 -13
- package/src/duckdb/src/parser/tableref/table_function.cpp +0 -15
- package/src/duckdb/src/parser/tableref.cpp +0 -44
- package/src/duckdb/src/storage/serialization/serialize_parsed_expression.cpp +340 -0
- package/src/duckdb/src/storage/serialization/serialize_query_node.cpp +122 -0
- package/src/duckdb/src/storage/serialization/serialize_result_modifier.cpp +86 -0
- package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +166 -0
- package/src/duckdb/ub_src_storage_serialization.cpp +8 -0
package/binding.gyp
CHANGED
@@ -132,6 +132,7 @@
|
|
132
132
|
"src/duckdb/ub_src_storage_checkpoint.cpp",
|
133
133
|
"src/duckdb/ub_src_storage_compression.cpp",
|
134
134
|
"src/duckdb/ub_src_storage_compression_chimp.cpp",
|
135
|
+
"src/duckdb/ub_src_storage_serialization.cpp",
|
135
136
|
"src/duckdb/ub_src_storage_statistics.cpp",
|
136
137
|
"src/duckdb/ub_src_storage_table.cpp",
|
137
138
|
"src/duckdb/ub_src_transaction.cpp",
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#include "duckdb/catalog/catalog_search_path.hpp"
|
2
2
|
|
3
|
+
#include "duckdb/catalog/catalog.hpp"
|
3
4
|
#include "duckdb/common/constants.hpp"
|
4
5
|
#include "duckdb/common/exception.hpp"
|
5
6
|
#include "duckdb/common/string_util.hpp"
|
6
7
|
#include "duckdb/main/client_context.hpp"
|
7
|
-
#include "duckdb/catalog/catalog.hpp"
|
8
8
|
#include "duckdb/main/database_manager.hpp"
|
9
9
|
|
10
10
|
namespace duckdb {
|
@@ -249,13 +249,14 @@ void CatalogSearchPath::SetPaths(vector<CatalogSearchEntry> new_paths) {
|
|
249
249
|
bool CatalogSearchPath::SchemaInSearchPath(ClientContext &context, const string &catalog_name,
|
250
250
|
const string &schema_name) {
|
251
251
|
for (auto &path : paths) {
|
252
|
-
if (path.schema
|
252
|
+
if (!StringUtil::CIEquals(path.schema, schema_name)) {
|
253
253
|
continue;
|
254
254
|
}
|
255
|
-
if (path.catalog
|
255
|
+
if (StringUtil::CIEquals(path.catalog, catalog_name)) {
|
256
256
|
return true;
|
257
257
|
}
|
258
|
-
if (IsInvalidCatalog(path.catalog) &&
|
258
|
+
if (IsInvalidCatalog(path.catalog) &&
|
259
|
+
StringUtil::CIEquals(catalog_name, DatabaseManager::GetDefaultDatabase(context))) {
|
259
260
|
return true;
|
260
261
|
}
|
261
262
|
}
|
@@ -26,7 +26,7 @@ public:
|
|
26
26
|
};
|
27
27
|
|
28
28
|
template <class OP, class RETURN_TYPE, typename... ARGS>
|
29
|
-
RETURN_TYPE RadixBitsSwitch(idx_t radix_bits, ARGS &&...args) {
|
29
|
+
RETURN_TYPE RadixBitsSwitch(idx_t radix_bits, ARGS &&... args) {
|
30
30
|
D_ASSERT(radix_bits <= RadixPartitioning::MAX_RADIX_BITS);
|
31
31
|
switch (radix_bits) {
|
32
32
|
case 1:
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#ifndef DUCKDB_VERSION
|
2
|
-
#define DUCKDB_VERSION "0.8.2-
|
2
|
+
#define DUCKDB_VERSION "0.8.2-dev1493"
|
3
3
|
#endif
|
4
4
|
#ifndef DUCKDB_SOURCE_ID
|
5
|
-
#define DUCKDB_SOURCE_ID "
|
5
|
+
#define DUCKDB_SOURCE_ID "f2dc7d8bce"
|
6
6
|
#endif
|
7
7
|
#include "duckdb/function/table/system_functions.hpp"
|
8
8
|
#include "duckdb/main/database.hpp"
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -5,7 +5,9 @@
|
|
5
5
|
//
|
6
6
|
//
|
7
7
|
//===----------------------------------------------------------------------===//
|
8
|
-
// This file is generated by scripts/generate_functions.py
|
8
|
+
// This file is automatically generated by scripts/generate_functions.py
|
9
|
+
// Do not edit this file manually, your changes will be overwritten
|
10
|
+
//===----------------------------------------------------------------------===//
|
9
11
|
|
10
12
|
#pragma once
|
11
13
|
|
@@ -36,5 +36,8 @@ public:
|
|
36
36
|
static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
|
37
37
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
38
38
|
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
39
|
+
|
40
|
+
private:
|
41
|
+
CollateExpression();
|
39
42
|
};
|
40
43
|
} // namespace duckdb
|
@@ -50,5 +50,8 @@ public:
|
|
50
50
|
static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
|
51
51
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
52
52
|
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
53
|
+
|
54
|
+
private:
|
55
|
+
ColumnRefExpression();
|
53
56
|
};
|
54
57
|
} // namespace duckdb
|
@@ -37,6 +37,9 @@ public:
|
|
37
37
|
|
38
38
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
39
39
|
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
40
|
+
|
41
|
+
private:
|
42
|
+
ConstantExpression();
|
40
43
|
};
|
41
44
|
|
42
45
|
} // namespace duckdb
|
@@ -31,5 +31,6 @@ public:
|
|
31
31
|
void Serialize(FieldWriter &writer) const override;
|
32
32
|
static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
|
33
33
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
34
|
+
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
34
35
|
};
|
35
36
|
} // namespace duckdb
|
@@ -42,6 +42,9 @@ public:
|
|
42
42
|
static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
|
43
43
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
44
44
|
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
45
|
+
|
46
|
+
private:
|
47
|
+
LambdaExpression();
|
45
48
|
};
|
46
49
|
|
47
50
|
} // namespace duckdb
|
@@ -35,5 +35,8 @@ public:
|
|
35
35
|
static unique_ptr<ParsedExpression> Deserialize(ExpressionType type, FieldReader &source);
|
36
36
|
void FormatSerialize(FormatSerializer &serializer) const override;
|
37
37
|
static unique_ptr<ParsedExpression> FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer);
|
38
|
+
|
39
|
+
private:
|
40
|
+
PositionalReferenceExpression();
|
38
41
|
};
|
39
42
|
} // namespace duckdb
|
@@ -31,6 +31,7 @@ public:
|
|
31
31
|
//! Deserializes a blob back into a DummyTableRef
|
32
32
|
static unique_ptr<TableRef> Deserialize(FieldReader &source);
|
33
33
|
|
34
|
+
void FormatSerialize(FormatSerializer &serializer) const override;
|
34
35
|
static unique_ptr<TableRef> FormatDeserialize(FormatDeserializer &source);
|
35
36
|
};
|
36
37
|
} // namespace duckdb
|
@@ -23,7 +23,7 @@ public:
|
|
23
23
|
static constexpr const TableReferenceType TYPE = TableReferenceType::JOIN;
|
24
24
|
|
25
25
|
public:
|
26
|
-
explicit JoinRef(JoinRefType ref_type)
|
26
|
+
explicit JoinRef(JoinRefType ref_type = JoinRefType::REGULAR)
|
27
27
|
: TableRef(TableReferenceType::JOIN), type(JoinType::INNER), ref_type(ref_type) {
|
28
28
|
}
|
29
29
|
|
@@ -17,6 +17,9 @@ class SubqueryRef : public TableRef {
|
|
17
17
|
public:
|
18
18
|
static constexpr const TableReferenceType TYPE = TableReferenceType::SUBQUERY;
|
19
19
|
|
20
|
+
private:
|
21
|
+
SubqueryRef();
|
22
|
+
|
20
23
|
public:
|
21
24
|
DUCKDB_API explicit SubqueryRef(unique_ptr<SelectStatement> subquery, string alias = string());
|
22
25
|
|
@@ -11,6 +11,9 @@ BetweenExpression::BetweenExpression(unique_ptr<ParsedExpression> input_p, uniqu
|
|
11
11
|
lower(std::move(lower_p)), upper(std::move(upper_p)) {
|
12
12
|
}
|
13
13
|
|
14
|
+
BetweenExpression::BetweenExpression() : BetweenExpression(nullptr, nullptr, nullptr) {
|
15
|
+
}
|
16
|
+
|
14
17
|
string BetweenExpression::ToString() const {
|
15
18
|
return ToString<BetweenExpression, ParsedExpression>(*this);
|
16
19
|
}
|
@@ -47,19 +50,4 @@ unique_ptr<ParsedExpression> BetweenExpression::Deserialize(ExpressionType type,
|
|
47
50
|
return make_uniq<BetweenExpression>(std::move(input), std::move(lower), std::move(upper));
|
48
51
|
}
|
49
52
|
|
50
|
-
void BetweenExpression::FormatSerialize(FormatSerializer &serializer) const {
|
51
|
-
ParsedExpression::FormatSerialize(serializer);
|
52
|
-
serializer.WriteProperty("input", *input);
|
53
|
-
serializer.WriteProperty("lower", *lower);
|
54
|
-
serializer.WriteProperty("upper", *upper);
|
55
|
-
}
|
56
|
-
|
57
|
-
unique_ptr<ParsedExpression> BetweenExpression::FormatDeserialize(ExpressionType type,
|
58
|
-
FormatDeserializer &deserializer) {
|
59
|
-
auto input = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("input");
|
60
|
-
auto lower = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("lower");
|
61
|
-
auto upper = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("upper");
|
62
|
-
return make_uniq<BetweenExpression>(std::move(input), std::move(lower), std::move(upper));
|
63
|
-
}
|
64
|
-
|
65
53
|
} // namespace duckdb
|
@@ -84,17 +84,4 @@ unique_ptr<ParsedExpression> CaseExpression::Deserialize(ExpressionType type, Fi
|
|
84
84
|
return std::move(result);
|
85
85
|
}
|
86
86
|
|
87
|
-
void CaseExpression::FormatSerialize(FormatSerializer &serializer) const {
|
88
|
-
ParsedExpression::FormatSerialize(serializer);
|
89
|
-
serializer.WriteProperty("case_checks", case_checks);
|
90
|
-
serializer.WriteProperty("else_expr", *else_expr);
|
91
|
-
}
|
92
|
-
|
93
|
-
unique_ptr<ParsedExpression> CaseExpression::FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer) {
|
94
|
-
auto result = make_uniq<CaseExpression>();
|
95
|
-
deserializer.ReadProperty("case_checks", result->case_checks);
|
96
|
-
deserializer.ReadProperty("else_expr", result->else_expr);
|
97
|
-
return std::move(result);
|
98
|
-
}
|
99
|
-
|
100
87
|
} // namespace duckdb
|
@@ -15,6 +15,9 @@ CastExpression::CastExpression(LogicalType target, unique_ptr<ParsedExpression>
|
|
15
15
|
this->child = std::move(child);
|
16
16
|
}
|
17
17
|
|
18
|
+
CastExpression::CastExpression() : ParsedExpression(ExpressionType::OPERATOR_CAST, ExpressionClass::CAST) {
|
19
|
+
}
|
20
|
+
|
18
21
|
string CastExpression::ToString() const {
|
19
22
|
return ToString<CastExpression, ParsedExpression>(*this);
|
20
23
|
}
|
@@ -51,18 +54,4 @@ unique_ptr<ParsedExpression> CastExpression::Deserialize(ExpressionType type, Fi
|
|
51
54
|
return make_uniq_base<ParsedExpression, CastExpression>(cast_type, std::move(child), try_cast);
|
52
55
|
}
|
53
56
|
|
54
|
-
void CastExpression::FormatSerialize(FormatSerializer &serializer) const {
|
55
|
-
ParsedExpression::FormatSerialize(serializer);
|
56
|
-
serializer.WriteProperty("child", *child);
|
57
|
-
serializer.WriteProperty("cast_type", cast_type);
|
58
|
-
serializer.WriteProperty("try_cast", try_cast);
|
59
|
-
}
|
60
|
-
|
61
|
-
unique_ptr<ParsedExpression> CastExpression::FormatDeserialize(ExpressionType type, FormatDeserializer &deserializer) {
|
62
|
-
auto child = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("child");
|
63
|
-
auto cast_type = deserializer.ReadProperty<LogicalType>("cast_type");
|
64
|
-
auto try_cast = deserializer.ReadProperty<bool>("try_cast");
|
65
|
-
return make_uniq_base<ParsedExpression, CastExpression>(cast_type, std::move(child), try_cast);
|
66
|
-
}
|
67
|
-
|
68
57
|
} // namespace duckdb
|
@@ -14,6 +14,9 @@ CollateExpression::CollateExpression(string collation_p, unique_ptr<ParsedExpres
|
|
14
14
|
this->child = std::move(child);
|
15
15
|
}
|
16
16
|
|
17
|
+
CollateExpression::CollateExpression() : ParsedExpression(ExpressionType::COLLATE, ExpressionClass::COLLATE) {
|
18
|
+
}
|
19
|
+
|
17
20
|
string CollateExpression::ToString() const {
|
18
21
|
return StringUtil::Format("%s COLLATE %s", child->ToString(), SQLIdentifier(collation));
|
19
22
|
}
|
@@ -45,17 +48,4 @@ unique_ptr<ParsedExpression> CollateExpression::Deserialize(ExpressionType type,
|
|
45
48
|
return make_uniq_base<ParsedExpression, CollateExpression>(collation, std::move(child));
|
46
49
|
}
|
47
50
|
|
48
|
-
void CollateExpression::FormatSerialize(FormatSerializer &serializer) const {
|
49
|
-
ParsedExpression::FormatSerialize(serializer);
|
50
|
-
serializer.WriteProperty("child", *child);
|
51
|
-
serializer.WriteProperty("collation", collation);
|
52
|
-
}
|
53
|
-
|
54
|
-
unique_ptr<ParsedExpression> CollateExpression::FormatDeserialize(ExpressionType type,
|
55
|
-
FormatDeserializer &deserializer) {
|
56
|
-
auto child = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("child");
|
57
|
-
auto collation = deserializer.ReadProperty<string>("collation");
|
58
|
-
return make_uniq_base<ParsedExpression, CollateExpression>(collation, std::move(child));
|
59
|
-
}
|
60
|
-
|
61
51
|
} // namespace duckdb
|
@@ -10,6 +10,9 @@
|
|
10
10
|
|
11
11
|
namespace duckdb {
|
12
12
|
|
13
|
+
ColumnRefExpression::ColumnRefExpression() : ParsedExpression(ExpressionType::COLUMN_REF, ExpressionClass::COLUMN_REF) {
|
14
|
+
}
|
15
|
+
|
13
16
|
ColumnRefExpression::ColumnRefExpression(string column_name, string table_name)
|
14
17
|
: ColumnRefExpression(table_name.empty() ? vector<string> {std::move(column_name)}
|
15
18
|
: vector<string> {std::move(table_name), std::move(column_name)}) {
|
@@ -100,16 +103,4 @@ unique_ptr<ParsedExpression> ColumnRefExpression::Deserialize(ExpressionType typ
|
|
100
103
|
return std::move(expression);
|
101
104
|
}
|
102
105
|
|
103
|
-
void ColumnRefExpression::FormatSerialize(FormatSerializer &serializer) const {
|
104
|
-
ParsedExpression::FormatSerialize(serializer);
|
105
|
-
serializer.WriteProperty("column_names", column_names);
|
106
|
-
}
|
107
|
-
|
108
|
-
unique_ptr<ParsedExpression> ColumnRefExpression::FormatDeserialize(ExpressionType type,
|
109
|
-
FormatDeserializer &deserializer) {
|
110
|
-
auto column_names = deserializer.ReadProperty<vector<string>>("column_names");
|
111
|
-
auto expression = make_uniq<ColumnRefExpression>(std::move(column_names));
|
112
|
-
return std::move(expression);
|
113
|
-
}
|
114
|
-
|
115
106
|
} // namespace duckdb
|
@@ -9,6 +9,9 @@
|
|
9
9
|
|
10
10
|
namespace duckdb {
|
11
11
|
|
12
|
+
ComparisonExpression::ComparisonExpression(ExpressionType type) : ParsedExpression(type, ExpressionClass::COMPARISON) {
|
13
|
+
}
|
14
|
+
|
12
15
|
ComparisonExpression::ComparisonExpression(ExpressionType type, unique_ptr<ParsedExpression> left,
|
13
16
|
unique_ptr<ParsedExpression> right)
|
14
17
|
: ParsedExpression(type, ExpressionClass::COMPARISON), left(std::move(left)), right(std::move(right)) {
|
@@ -45,17 +48,4 @@ unique_ptr<ParsedExpression> ComparisonExpression::Deserialize(ExpressionType ty
|
|
45
48
|
return make_uniq<ComparisonExpression>(type, std::move(left_child), std::move(right_child));
|
46
49
|
}
|
47
50
|
|
48
|
-
void ComparisonExpression::FormatSerialize(FormatSerializer &serializer) const {
|
49
|
-
ParsedExpression::FormatSerialize(serializer);
|
50
|
-
serializer.WriteProperty("left", *left);
|
51
|
-
serializer.WriteProperty("right", *right);
|
52
|
-
}
|
53
|
-
|
54
|
-
unique_ptr<ParsedExpression> ComparisonExpression::FormatDeserialize(ExpressionType type,
|
55
|
-
FormatDeserializer &deserializer) {
|
56
|
-
auto left = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("left");
|
57
|
-
auto right = deserializer.ReadProperty<unique_ptr<ParsedExpression>>("right");
|
58
|
-
return make_uniq<ComparisonExpression>(type, std::move(left), std::move(right));
|
59
|
-
}
|
60
|
-
|
61
51
|
} // namespace duckdb
|
@@ -68,16 +68,4 @@ unique_ptr<ParsedExpression> ConjunctionExpression::Deserialize(ExpressionType t
|
|
68
68
|
return std::move(result);
|
69
69
|
}
|
70
70
|
|
71
|
-
void ConjunctionExpression::FormatSerialize(FormatSerializer &serializer) const {
|
72
|
-
ParsedExpression::FormatSerialize(serializer);
|
73
|
-
serializer.WriteProperty("children", children);
|
74
|
-
}
|
75
|
-
|
76
|
-
unique_ptr<ParsedExpression> ConjunctionExpression::FormatDeserialize(ExpressionType type,
|
77
|
-
FormatDeserializer &deserializer) {
|
78
|
-
auto result = make_uniq<ConjunctionExpression>(type);
|
79
|
-
result->children = deserializer.ReadProperty<vector<unique_ptr<ParsedExpression>>>("children");
|
80
|
-
return std::move(result);
|
81
|
-
}
|
82
|
-
|
83
71
|
} // namespace duckdb
|
@@ -10,6 +10,9 @@
|
|
10
10
|
|
11
11
|
namespace duckdb {
|
12
12
|
|
13
|
+
ConstantExpression::ConstantExpression() : ParsedExpression(ExpressionType::VALUE_CONSTANT, ExpressionClass::CONSTANT) {
|
14
|
+
}
|
15
|
+
|
13
16
|
ConstantExpression::ConstantExpression(Value val)
|
14
17
|
: ParsedExpression(ExpressionType::VALUE_CONSTANT, ExpressionClass::CONSTANT), value(std::move(val)) {
|
15
18
|
}
|
@@ -41,15 +44,4 @@ unique_ptr<ParsedExpression> ConstantExpression::Deserialize(ExpressionType type
|
|
41
44
|
return make_uniq<ConstantExpression>(std::move(value));
|
42
45
|
}
|
43
46
|
|
44
|
-
void ConstantExpression::FormatSerialize(FormatSerializer &serializer) const {
|
45
|
-
ParsedExpression::FormatSerialize(serializer);
|
46
|
-
serializer.WriteProperty("value", value);
|
47
|
-
}
|
48
|
-
|
49
|
-
unique_ptr<ParsedExpression> ConstantExpression::FormatDeserialize(ExpressionType type,
|
50
|
-
FormatDeserializer &deserializer) {
|
51
|
-
auto value = deserializer.ReadProperty<Value>("value");
|
52
|
-
return make_uniq<ConstantExpression>(std::move(value));
|
53
|
-
}
|
54
|
-
|
55
47
|
} // namespace duckdb
|