duckdb 0.5.1-dev21.0 → 0.5.1-dev25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/duckdb.cpp +34 -9
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +37362 -37362
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -181201,7 +181201,20 @@ BoundStatement Binder::Bind(VacuumStatement &stmt) {
|
|
|
181201
181201
|
auto &get = (LogicalGet &)*ref->get;
|
|
181202
181202
|
columns.insert(columns.end(), get.names.begin(), get.names.end());
|
|
181203
181203
|
}
|
|
181204
|
+
|
|
181205
|
+
case_insensitive_set_t column_name_set;
|
|
181206
|
+
vector<string> non_generated_column_names;
|
|
181204
181207
|
for (auto &col_name : columns) {
|
|
181208
|
+
if (column_name_set.count(col_name) > 0) {
|
|
181209
|
+
throw BinderException("Vacuum the same column twice(same name in column name list)");
|
|
181210
|
+
}
|
|
181211
|
+
column_name_set.insert(col_name);
|
|
181212
|
+
auto &col = ref->table->GetColumn(col_name);
|
|
181213
|
+
// ignore generated column
|
|
181214
|
+
if (col.Generated()) {
|
|
181215
|
+
continue;
|
|
181216
|
+
}
|
|
181217
|
+
non_generated_column_names.push_back(col_name);
|
|
181205
181218
|
ColumnRefExpression colref(col_name, ref->table->name);
|
|
181206
181219
|
auto result = bind_context.BindColumn(colref, 0);
|
|
181207
181220
|
if (result.HasError()) {
|
|
@@ -181209,17 +181222,29 @@ BoundStatement Binder::Bind(VacuumStatement &stmt) {
|
|
|
181209
181222
|
}
|
|
181210
181223
|
select_list.push_back(move(result.expression));
|
|
181211
181224
|
}
|
|
181212
|
-
|
|
181213
|
-
|
|
181214
|
-
|
|
181215
|
-
|
|
181216
|
-
stmt.info->column_id_map[i] = get.column_ids[i];
|
|
181217
|
-
}
|
|
181225
|
+
stmt.info->columns = move(non_generated_column_names);
|
|
181226
|
+
if (!select_list.empty()) {
|
|
181227
|
+
auto table_scan = CreatePlan(*ref);
|
|
181228
|
+
D_ASSERT(table_scan->type == LogicalOperatorType::LOGICAL_GET);
|
|
181218
181229
|
|
|
181219
|
-
|
|
181220
|
-
|
|
181230
|
+
auto &get = (LogicalGet &)*table_scan;
|
|
181231
|
+
|
|
181232
|
+
D_ASSERT(select_list.size() == get.column_ids.size());
|
|
181233
|
+
D_ASSERT(stmt.info->columns.size() == get.column_ids.size());
|
|
181234
|
+
for (idx_t i = 0; i < get.column_ids.size(); i++) {
|
|
181235
|
+
stmt.info->column_id_map[i] = ref->table->columns[get.column_ids[i]].StorageOid();
|
|
181236
|
+
}
|
|
181221
181237
|
|
|
181222
|
-
|
|
181238
|
+
auto projection = make_unique<LogicalProjection>(GenerateTableIndex(), move(select_list));
|
|
181239
|
+
projection->children.push_back(move(table_scan));
|
|
181240
|
+
|
|
181241
|
+
root = move(projection);
|
|
181242
|
+
} else {
|
|
181243
|
+
// eg. CREATE TABLE test (x AS (1));
|
|
181244
|
+
// ANALYZE test;
|
|
181245
|
+
// Make it not a SINK so it doesn't have to do anything
|
|
181246
|
+
stmt.info->has_table = false;
|
|
181247
|
+
}
|
|
181223
181248
|
}
|
|
181224
181249
|
auto vacuum = make_unique<LogicalSimple>(LogicalOperatorType::LOGICAL_VACUUM, move(stmt.info));
|
|
181225
181250
|
if (root) {
|
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 "
|
|
15
|
-
#define DUCKDB_VERSION "v0.5.1-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "7ebad2075"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.1-dev25"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|