duckdb 0.8.2-dev2356.0 → 0.8.2-dev2509.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 +7 -7
- package/package.json +1 -1
- package/src/duckdb/extension/icu/icu-datefunc.cpp +9 -0
- package/src/duckdb/extension/icu/icu-datepart.cpp +7 -5
- package/src/duckdb/extension/icu/icu-strptime.cpp +1 -20
- package/src/duckdb/src/common/http_state.cpp +78 -0
- package/src/duckdb/src/common/types/list_segment.cpp +42 -134
- package/src/duckdb/src/common/types/vector.cpp +21 -0
- package/src/duckdb/src/core_functions/aggregate/holistic/mode.cpp +5 -7
- package/src/duckdb/src/core_functions/aggregate/holistic/quantile.cpp +17 -19
- package/src/duckdb/src/core_functions/aggregate/nested/list.cpp +80 -61
- package/src/duckdb/src/core_functions/function_list.cpp +2 -2
- package/src/duckdb/src/core_functions/scalar/list/array_slice.cpp +308 -82
- package/src/duckdb/src/execution/aggregate_hashtable.cpp +6 -0
- package/src/duckdb/src/execution/perfect_aggregate_hashtable.cpp +11 -5
- package/src/duckdb/src/execution/window_executor.cpp +18 -20
- package/src/duckdb/src/function/aggregate/distributive/count.cpp +2 -2
- package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
- package/src/duckdb/src/include/duckdb/common/http_state.hpp +61 -28
- package/src/duckdb/src/include/duckdb/common/types/list_segment.hpp +9 -11
- package/src/duckdb/src/include/duckdb/common/types/vector.hpp +7 -0
- package/src/duckdb/src/include/duckdb/common/vector_operations/aggregate_executor.hpp +7 -2
- package/src/duckdb/src/include/duckdb/core_functions/scalar/list_functions.hpp +4 -4
- package/src/duckdb/src/include/duckdb/execution/perfect_aggregate_hashtable.hpp +4 -2
- package/src/duckdb/src/include/duckdb/execution/window_segment_tree.hpp +0 -2
- package/src/duckdb/src/include/duckdb/function/aggregate_function.hpp +0 -1
- package/src/duckdb/src/include/duckdb/parser/expression/operator_expression.hpp +20 -3
- package/src/duckdb/src/main/extension/extension_helper.cpp +2 -1
- package/src/duckdb/src/parser/transform/expression/transform_array_access.cpp +13 -4
- package/src/duckdb/src/parser/transform/expression/transform_function.cpp +3 -0
- package/src/duckdb/src/storage/serialization/serialize_constraint.cpp +2 -2
- package/src/duckdb/src/storage/serialization/serialize_create_info.cpp +2 -2
- package/src/duckdb/src/storage/serialization/serialize_parse_info.cpp +2 -2
- package/src/duckdb/src/storage/serialization/serialize_tableref.cpp +2 -4
- package/src/duckdb/third_party/libpg_query/include/nodes/parsenodes.hpp +1 -0
- package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +11077 -10674
- package/src/duckdb/ub_extension_icu_third_party_icu_i18n.cpp +6 -6
- package/src/duckdb/ub_src_common.cpp +2 -0
@@ -16,51 +16,84 @@
|
|
16
16
|
|
17
17
|
namespace duckdb {
|
18
18
|
|
19
|
-
|
19
|
+
class CachedFileHandle;
|
20
|
+
|
21
|
+
//! Represents a file that is intended to be fully downloaded, then used in parallel by multiple threads
|
22
|
+
class CachedFile : public std::enable_shared_from_this<CachedFile> {
|
23
|
+
friend class CachedFileHandle;
|
24
|
+
|
25
|
+
public:
|
26
|
+
unique_ptr<CachedFileHandle> GetHandle() {
|
27
|
+
auto this_ptr = shared_from_this();
|
28
|
+
return make_uniq<CachedFileHandle>(this_ptr);
|
29
|
+
}
|
30
|
+
|
31
|
+
private:
|
20
32
|
//! Cached Data
|
21
33
|
shared_ptr<char> data;
|
22
34
|
//! Data capacity
|
23
35
|
uint64_t capacity = 0;
|
24
|
-
//!
|
25
|
-
|
36
|
+
//! Lock for initializing the file
|
37
|
+
mutex lock;
|
38
|
+
//! When initialized is set to true, the file is safe for parallel reading without holding the lock
|
39
|
+
atomic<bool> initialized = {false};
|
40
|
+
};
|
41
|
+
|
42
|
+
//! Handle to a CachedFile
|
43
|
+
class CachedFileHandle {
|
44
|
+
public:
|
45
|
+
explicit CachedFileHandle(shared_ptr<CachedFile> &file_p);
|
46
|
+
|
47
|
+
//! allocate a buffer for the file
|
48
|
+
void AllocateBuffer(idx_t size);
|
49
|
+
//! Indicate the file is fully downloaded and safe for parallel reading without lock
|
50
|
+
void SetInitialized();
|
51
|
+
//! Grow buffer to new size, copying over `bytes_to_copy` to the new buffer
|
52
|
+
void GrowBuffer(idx_t new_capacity, idx_t bytes_to_copy);
|
53
|
+
//! Write to the buffer
|
54
|
+
void Write(const char *buffer, idx_t length, idx_t offset = 0);
|
55
|
+
|
56
|
+
bool Initialized() {
|
57
|
+
return file->initialized;
|
58
|
+
}
|
59
|
+
const char *GetData() {
|
60
|
+
return file->data.get();
|
61
|
+
}
|
62
|
+
uint64_t GetCapacity() {
|
63
|
+
return file->capacity;
|
64
|
+
}
|
65
|
+
|
66
|
+
private:
|
67
|
+
unique_ptr<lock_guard<mutex>> lock;
|
68
|
+
shared_ptr<CachedFile> file;
|
26
69
|
};
|
27
70
|
|
28
71
|
class HTTPState {
|
29
72
|
public:
|
73
|
+
//! Reset all counters and cached files
|
74
|
+
void Reset();
|
75
|
+
//! Get cache entry, create if not exists
|
76
|
+
shared_ptr<CachedFile> &GetCachedFile(const string &path);
|
77
|
+
//! Helper function to get the HTTP state
|
78
|
+
static shared_ptr<HTTPState> TryGetState(FileOpener *opener);
|
79
|
+
|
80
|
+
bool IsEmpty() {
|
81
|
+
return head_count == 0 && get_count == 0 && put_count == 0 && post_count == 0 && total_bytes_received == 0 &&
|
82
|
+
total_bytes_sent == 0;
|
83
|
+
}
|
84
|
+
|
30
85
|
atomic<idx_t> head_count {0};
|
31
86
|
atomic<idx_t> get_count {0};
|
32
87
|
atomic<idx_t> put_count {0};
|
33
88
|
atomic<idx_t> post_count {0};
|
34
89
|
atomic<idx_t> total_bytes_received {0};
|
35
90
|
atomic<idx_t> total_bytes_sent {0};
|
91
|
+
|
92
|
+
private:
|
36
93
|
//! Mutex to lock when getting the cached file(Parallel Only)
|
37
94
|
mutex cached_files_mutex;
|
38
95
|
//! In case of fully downloading the file, the cached files of this query
|
39
|
-
unordered_map<string, CachedFile
|
40
|
-
|
41
|
-
void Reset() {
|
42
|
-
head_count = 0;
|
43
|
-
get_count = 0;
|
44
|
-
put_count = 0;
|
45
|
-
post_count = 0;
|
46
|
-
total_bytes_received = 0;
|
47
|
-
total_bytes_sent = 0;
|
48
|
-
cached_files.clear();
|
49
|
-
}
|
50
|
-
|
51
|
-
//! helper function to get the HTTP
|
52
|
-
static shared_ptr<HTTPState> TryGetState(FileOpener *opener) {
|
53
|
-
auto client_context = FileOpener::TryGetClientContext(opener);
|
54
|
-
if (client_context) {
|
55
|
-
return client_context->client_data->http_state;
|
56
|
-
}
|
57
|
-
return nullptr;
|
58
|
-
}
|
59
|
-
|
60
|
-
bool IsEmpty() {
|
61
|
-
return head_count == 0 && get_count == 0 && put_count == 0 && post_count == 0 && total_bytes_received == 0 &&
|
62
|
-
total_bytes_sent == 0;
|
63
|
-
}
|
96
|
+
unordered_map<string, shared_ptr<CachedFile>> cached_files;
|
64
97
|
};
|
65
98
|
|
66
99
|
} // namespace duckdb
|
@@ -22,14 +22,14 @@ struct ListSegment {
|
|
22
22
|
ListSegment *next;
|
23
23
|
};
|
24
24
|
struct LinkedList {
|
25
|
-
LinkedList() {};
|
25
|
+
LinkedList() : total_capacity(0), first_segment(nullptr), last_segment(nullptr) {};
|
26
26
|
LinkedList(idx_t total_capacity_p, ListSegment *first_segment_p, ListSegment *last_segment_p)
|
27
27
|
: total_capacity(total_capacity_p), first_segment(first_segment_p), last_segment(last_segment_p) {
|
28
28
|
}
|
29
29
|
|
30
|
-
idx_t total_capacity
|
31
|
-
ListSegment *first_segment
|
32
|
-
ListSegment *last_segment
|
30
|
+
idx_t total_capacity;
|
31
|
+
ListSegment *first_segment;
|
32
|
+
ListSegment *last_segment;
|
33
33
|
};
|
34
34
|
|
35
35
|
// forward declarations
|
@@ -37,23 +37,21 @@ struct ListSegmentFunctions;
|
|
37
37
|
typedef ListSegment *(*create_segment_t)(const ListSegmentFunctions &functions, ArenaAllocator &allocator,
|
38
38
|
uint16_t capacity);
|
39
39
|
typedef void (*write_data_to_segment_t)(const ListSegmentFunctions &functions, ArenaAllocator &allocator,
|
40
|
-
ListSegment *segment,
|
40
|
+
ListSegment *segment, RecursiveUnifiedVectorFormat &input_data,
|
41
|
+
idx_t &entry_idx);
|
41
42
|
typedef void (*read_data_from_segment_t)(const ListSegmentFunctions &functions, const ListSegment *segment,
|
42
43
|
Vector &result, idx_t &total_count);
|
43
|
-
typedef ListSegment *(*copy_data_from_segment_t)(const ListSegmentFunctions &functions, const ListSegment *source,
|
44
|
-
ArenaAllocator &allocator);
|
45
44
|
|
46
45
|
struct ListSegmentFunctions {
|
47
46
|
create_segment_t create_segment;
|
48
47
|
write_data_to_segment_t write_data;
|
49
48
|
read_data_from_segment_t read_data;
|
50
|
-
|
49
|
+
|
51
50
|
vector<ListSegmentFunctions> child_functions;
|
52
51
|
|
53
|
-
void AppendRow(ArenaAllocator &allocator, LinkedList &linked_list,
|
54
|
-
idx_t &
|
52
|
+
void AppendRow(ArenaAllocator &allocator, LinkedList &linked_list, RecursiveUnifiedVectorFormat &input_data,
|
53
|
+
idx_t &entry_idx) const;
|
55
54
|
void BuildListVector(const LinkedList &linked_list, Vector &result, idx_t &initial_total_count) const;
|
56
|
-
void CopyLinkedList(const LinkedList &source_list, LinkedList &target_list, ArenaAllocator &allocator) const;
|
57
55
|
};
|
58
56
|
|
59
57
|
void GetSegmentDataFunctions(ListSegmentFunctions &functions, const LogicalType &type);
|
@@ -35,6 +35,11 @@ struct UnifiedVectorFormat {
|
|
35
35
|
}
|
36
36
|
};
|
37
37
|
|
38
|
+
struct RecursiveUnifiedVectorFormat {
|
39
|
+
UnifiedVectorFormat unified;
|
40
|
+
vector<RecursiveUnifiedVectorFormat> children;
|
41
|
+
};
|
42
|
+
|
38
43
|
class VectorCache;
|
39
44
|
class VectorStructBuffer;
|
40
45
|
class VectorListBuffer;
|
@@ -140,6 +145,8 @@ public:
|
|
140
145
|
//! The most common vector types (flat, constant & dictionary) can be converted to the canonical format "for free"
|
141
146
|
//! ToUnifiedFormat was originally called Orrify, as a tribute to Orri Erling who came up with it
|
142
147
|
DUCKDB_API void ToUnifiedFormat(idx_t count, UnifiedVectorFormat &data);
|
148
|
+
//! Recursively calls UnifiedVectorFormat on a vector and its child vectors (for nested types)
|
149
|
+
static void RecursiveToUnifiedFormat(Vector &input, idx_t count, RecursiveUnifiedVectorFormat &data);
|
143
150
|
|
144
151
|
//! Turn the vector into a sequence vector
|
145
152
|
DUCKDB_API void Sequence(int64_t start, int64_t increment, idx_t count);
|
@@ -15,9 +15,14 @@
|
|
15
15
|
|
16
16
|
namespace duckdb {
|
17
17
|
|
18
|
+
// structs
|
18
19
|
struct AggregateInputData;
|
19
|
-
|
20
|
-
|
20
|
+
struct FrameBounds {
|
21
|
+
FrameBounds() : start(0), end(0) {};
|
22
|
+
FrameBounds(idx_t start, idx_t end) : start(start), end(end) {};
|
23
|
+
idx_t start = 0;
|
24
|
+
idx_t end = 0;
|
25
|
+
};
|
21
26
|
|
22
27
|
class AggregateExecutor {
|
23
28
|
private:
|
@@ -104,11 +104,11 @@ struct ListPackFun {
|
|
104
104
|
|
105
105
|
struct ListSliceFun {
|
106
106
|
static constexpr const char *Name = "list_slice";
|
107
|
-
static constexpr const char *Parameters = "list,begin,end";
|
108
|
-
static constexpr const char *Description = "Extract a sublist using slice conventions.
|
109
|
-
static constexpr const char *Example = "list_slice(l, 2,
|
107
|
+
static constexpr const char *Parameters = "list,begin,end[,step]";
|
108
|
+
static constexpr const char *Description = "Extract a sublist using slice conventions. Negative values are accepted.";
|
109
|
+
static constexpr const char *Example = "list_slice(l, 2, 4)";
|
110
110
|
|
111
|
-
static
|
111
|
+
static ScalarFunctionSet GetFunctions();
|
112
112
|
};
|
113
113
|
|
114
114
|
struct ArraySliceFun {
|
@@ -56,8 +56,10 @@ protected:
|
|
56
56
|
//! Reused selection vector
|
57
57
|
SelectionVector sel;
|
58
58
|
|
59
|
-
//! The arena allocator used by the aggregates for their internal state
|
60
|
-
ArenaAllocator aggregate_allocator;
|
59
|
+
//! The active arena allocator used by the aggregates for their internal state
|
60
|
+
unique_ptr<ArenaAllocator> aggregate_allocator;
|
61
|
+
//! Owning arena allocators that this HT has data from
|
62
|
+
vector<unique_ptr<ArenaAllocator>> stored_allocators;
|
61
63
|
|
62
64
|
private:
|
63
65
|
//! Destroy the perfect aggregate HT (called automatically by the destructor)
|
@@ -117,8 +117,6 @@ public:
|
|
117
117
|
|
118
118
|
class WindowSegmentTree : public WindowAggregator {
|
119
119
|
public:
|
120
|
-
using FrameBounds = std::pair<idx_t, idx_t>;
|
121
|
-
|
122
120
|
WindowSegmentTree(AggregateObject aggr, const LogicalType &result_type, idx_t count, WindowAggregationMode mode_p);
|
123
121
|
~WindowSegmentTree() override;
|
124
122
|
|
@@ -41,7 +41,6 @@ typedef void (*aggregate_simple_update_t)(Vector inputs[], AggregateInputData &a
|
|
41
41
|
data_ptr_t state, idx_t count);
|
42
42
|
|
43
43
|
//! The type used for updating complex windowed aggregate functions (optional)
|
44
|
-
typedef std::pair<idx_t, idx_t> FrameBounds;
|
45
44
|
typedef void (*aggregate_window_t)(Vector inputs[], const ValidityMask &filter_mask,
|
46
45
|
AggregateInputData &aggr_input_data, idx_t input_count, data_ptr_t state,
|
47
46
|
const FrameBounds &frame, const FrameBounds &prev, Vector &result, idx_t rid,
|
@@ -12,6 +12,7 @@
|
|
12
12
|
#include "duckdb/common/vector.hpp"
|
13
13
|
#include "duckdb/common/string_util.hpp"
|
14
14
|
#include "duckdb/parser/qualified_name.hpp"
|
15
|
+
#include "duckdb/parser/expression/constant_expression.hpp"
|
15
16
|
|
16
17
|
namespace duckdb {
|
17
18
|
//! Represents a built-in operator expression
|
@@ -86,9 +87,25 @@ public:
|
|
86
87
|
return "(" + entry.children[0]->ToString() + " IS NOT NULL)";
|
87
88
|
case ExpressionType::ARRAY_EXTRACT:
|
88
89
|
return entry.children[0]->ToString() + "[" + entry.children[1]->ToString() + "]";
|
89
|
-
case ExpressionType::ARRAY_SLICE:
|
90
|
-
|
91
|
-
|
90
|
+
case ExpressionType::ARRAY_SLICE: {
|
91
|
+
string begin = entry.children[1]->ToString();
|
92
|
+
if (begin == "[]") {
|
93
|
+
begin = "";
|
94
|
+
}
|
95
|
+
string end = entry.children[2]->ToString();
|
96
|
+
if (end == "[]") {
|
97
|
+
if (entry.children.size() == 4) {
|
98
|
+
end = "-";
|
99
|
+
} else {
|
100
|
+
end = "";
|
101
|
+
}
|
102
|
+
}
|
103
|
+
if (entry.children.size() == 4) {
|
104
|
+
return entry.children[0]->ToString() + "[" + begin + ":" + end + ":" + entry.children[3]->ToString() +
|
105
|
+
"]";
|
106
|
+
}
|
107
|
+
return entry.children[0]->ToString() + "[" + begin + ":" + end + "]";
|
108
|
+
}
|
92
109
|
case ExpressionType::STRUCT_EXTRACT: {
|
93
110
|
if (entry.children[1]->type != ExpressionType::VALUE_CONSTANT) {
|
94
111
|
return string();
|
@@ -180,7 +180,8 @@ ExtensionLoadResult ExtensionHelper::LoadExtensionInternal(DuckDB &db, const std
|
|
180
180
|
#endif
|
181
181
|
|
182
182
|
#ifdef DUCKDB_EXTENSIONS_TEST_WITH_LOADABLE
|
183
|
-
|
183
|
+
// Note: weird comma's are on purpose to do easy string contains on a list of extension names
|
184
|
+
if (!initial_load && StringUtil::Contains(DUCKDB_EXTENSIONS_TEST_WITH_LOADABLE, "," + extension + ",")) {
|
184
185
|
Connection con(db);
|
185
186
|
auto result = con.Query((string) "LOAD '" + DUCKDB_EXTENSIONS_BUILD_PATH + "/" + extension + "/" + extension +
|
186
187
|
".duckdb_extension'");
|
@@ -27,10 +27,19 @@ unique_ptr<ParsedExpression> Transformer::TransformArrayAccess(duckdb_libpgquery
|
|
27
27
|
children.push_back(std::move(result));
|
28
28
|
if (index->is_slice) {
|
29
29
|
// slice
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
// if either the lower or upper bound is not specified, we use an empty const list so that we can
|
31
|
+
// handle it in the execution
|
32
|
+
unique_ptr<ParsedExpression> lower =
|
33
|
+
index->lidx ? TransformExpression(index->lidx)
|
34
|
+
: make_uniq<ConstantExpression>(Value::LIST(LogicalType::INTEGER, vector<Value>()));
|
35
|
+
children.push_back(std::move(lower));
|
36
|
+
unique_ptr<ParsedExpression> upper =
|
37
|
+
index->uidx ? TransformExpression(index->uidx)
|
38
|
+
: make_uniq<ConstantExpression>(Value::LIST(LogicalType::INTEGER, vector<Value>()));
|
39
|
+
children.push_back(std::move(upper));
|
40
|
+
if (index->step) {
|
41
|
+
children.push_back(TransformExpression(index->step));
|
42
|
+
}
|
34
43
|
result = make_uniq<OperatorExpression>(ExpressionType::ARRAY_SLICE, std::move(children));
|
35
44
|
} else {
|
36
45
|
// array access
|
@@ -209,6 +209,9 @@ unique_ptr<ParsedExpression> Transformer::TransformFuncCall(duckdb_libpgquery::P
|
|
209
209
|
}
|
210
210
|
window_ref = it->second;
|
211
211
|
D_ASSERT(window_ref);
|
212
|
+
if (window_ref->startOffset || window_ref->endOffset || window_ref->frameOptions != FRAMEOPTION_DEFAULTS) {
|
213
|
+
throw ParserException("cannot copy window \"%s\" because it has a frame clause", window_spec->refname);
|
214
|
+
}
|
212
215
|
}
|
213
216
|
in_window_definition = true;
|
214
217
|
TransformWindowDef(*window_ref, *expr);
|
@@ -50,7 +50,7 @@ void ForeignKeyConstraint::FormatSerialize(FormatSerializer &serializer) const {
|
|
50
50
|
Constraint::FormatSerialize(serializer);
|
51
51
|
serializer.WriteProperty("pk_columns", pk_columns);
|
52
52
|
serializer.WriteProperty("fk_columns", fk_columns);
|
53
|
-
serializer.WriteProperty("
|
53
|
+
serializer.WriteProperty("fk_type", info.type);
|
54
54
|
serializer.WriteProperty("schema", info.schema);
|
55
55
|
serializer.WriteProperty("table", info.table);
|
56
56
|
serializer.WriteProperty("pk_keys", info.pk_keys);
|
@@ -61,7 +61,7 @@ unique_ptr<Constraint> ForeignKeyConstraint::FormatDeserialize(FormatDeserialize
|
|
61
61
|
auto result = duckdb::unique_ptr<ForeignKeyConstraint>(new ForeignKeyConstraint());
|
62
62
|
deserializer.ReadProperty("pk_columns", result->pk_columns);
|
63
63
|
deserializer.ReadProperty("fk_columns", result->fk_columns);
|
64
|
-
deserializer.ReadProperty("
|
64
|
+
deserializer.ReadProperty("fk_type", result->info.type);
|
65
65
|
deserializer.ReadProperty("schema", result->info.schema);
|
66
66
|
deserializer.ReadProperty("table", result->info.table);
|
67
67
|
deserializer.ReadProperty("pk_keys", result->info.pk_keys);
|
@@ -160,13 +160,13 @@ unique_ptr<CreateInfo> CreateTableInfo::FormatDeserialize(FormatDeserializer &de
|
|
160
160
|
void CreateTypeInfo::FormatSerialize(FormatSerializer &serializer) const {
|
161
161
|
CreateInfo::FormatSerialize(serializer);
|
162
162
|
serializer.WriteProperty("name", name);
|
163
|
-
serializer.WriteProperty("
|
163
|
+
serializer.WriteProperty("logical_type", type);
|
164
164
|
}
|
165
165
|
|
166
166
|
unique_ptr<CreateInfo> CreateTypeInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
167
167
|
auto result = duckdb::unique_ptr<CreateTypeInfo>(new CreateTypeInfo());
|
168
168
|
deserializer.ReadProperty("name", result->name);
|
169
|
-
deserializer.ReadProperty("
|
169
|
+
deserializer.ReadProperty("logical_type", result->type);
|
170
170
|
return std::move(result);
|
171
171
|
}
|
172
172
|
|
@@ -176,7 +176,7 @@ void AlterForeignKeyInfo::FormatSerialize(FormatSerializer &serializer) const {
|
|
176
176
|
serializer.WriteProperty("fk_columns", fk_columns);
|
177
177
|
serializer.WriteProperty("pk_keys", pk_keys);
|
178
178
|
serializer.WriteProperty("fk_keys", fk_keys);
|
179
|
-
serializer.WriteProperty("
|
179
|
+
serializer.WriteProperty("alter_fk_type", type);
|
180
180
|
}
|
181
181
|
|
182
182
|
unique_ptr<AlterTableInfo> AlterForeignKeyInfo::FormatDeserialize(FormatDeserializer &deserializer) {
|
@@ -186,7 +186,7 @@ unique_ptr<AlterTableInfo> AlterForeignKeyInfo::FormatDeserialize(FormatDeserial
|
|
186
186
|
deserializer.ReadProperty("fk_columns", result->fk_columns);
|
187
187
|
deserializer.ReadProperty("pk_keys", result->pk_keys);
|
188
188
|
deserializer.ReadProperty("fk_keys", result->fk_keys);
|
189
|
-
deserializer.ReadProperty("
|
189
|
+
deserializer.ReadProperty("alter_fk_type", result->type);
|
190
190
|
return std::move(result);
|
191
191
|
}
|
192
192
|
|
@@ -96,7 +96,7 @@ void JoinRef::FormatSerialize(FormatSerializer &serializer) const {
|
|
96
96
|
serializer.WriteProperty("left", *left);
|
97
97
|
serializer.WriteProperty("right", *right);
|
98
98
|
serializer.WriteOptionalProperty("condition", condition);
|
99
|
-
serializer.WriteProperty("
|
99
|
+
serializer.WriteProperty("join_type", type);
|
100
100
|
serializer.WriteProperty("ref_type", ref_type);
|
101
101
|
serializer.WriteProperty("using_columns", using_columns);
|
102
102
|
}
|
@@ -106,7 +106,7 @@ unique_ptr<TableRef> JoinRef::FormatDeserialize(FormatDeserializer &deserializer
|
|
106
106
|
deserializer.ReadProperty("left", result->left);
|
107
107
|
deserializer.ReadProperty("right", result->right);
|
108
108
|
deserializer.ReadOptionalProperty("condition", result->condition);
|
109
|
-
deserializer.ReadProperty("
|
109
|
+
deserializer.ReadProperty("join_type", result->type);
|
110
110
|
deserializer.ReadProperty("ref_type", result->ref_type);
|
111
111
|
deserializer.ReadProperty("using_columns", result->using_columns);
|
112
112
|
return std::move(result);
|
@@ -151,14 +151,12 @@ unique_ptr<TableRef> SubqueryRef::FormatDeserialize(FormatDeserializer &deserial
|
|
151
151
|
void TableFunctionRef::FormatSerialize(FormatSerializer &serializer) const {
|
152
152
|
TableRef::FormatSerialize(serializer);
|
153
153
|
serializer.WriteProperty("function", *function);
|
154
|
-
serializer.WriteProperty("alias", alias);
|
155
154
|
serializer.WriteProperty("column_name_alias", column_name_alias);
|
156
155
|
}
|
157
156
|
|
158
157
|
unique_ptr<TableRef> TableFunctionRef::FormatDeserialize(FormatDeserializer &deserializer) {
|
159
158
|
auto result = duckdb::unique_ptr<TableFunctionRef>(new TableFunctionRef());
|
160
159
|
deserializer.ReadProperty("function", result->function);
|
161
|
-
deserializer.ReadProperty("alias", result->alias);
|
162
160
|
deserializer.ReadProperty("column_name_alias", result->column_name_alias);
|
163
161
|
return std::move(result);
|
164
162
|
}
|
@@ -325,6 +325,7 @@ typedef struct PGAIndices {
|
|
325
325
|
bool is_slice; /* true if slice (i.e., colon present) */
|
326
326
|
PGNode *lidx; /* slice lower bound, if any */
|
327
327
|
PGNode *uidx; /* subscript, or slice upper bound if any */
|
328
|
+
PGNode *step; /* slice step, if any */
|
328
329
|
} PGAIndices;
|
329
330
|
|
330
331
|
/*
|