duckdb 0.5.2-dev2278.0 → 0.5.2-dev2283.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 +20 -0
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +37674 -37674
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -201228,6 +201228,21 @@ TableBinding::TableBinding(const string &alias, vector<LogicalType> types_p, vec
|
|
|
201228
201228
|
}
|
|
201229
201229
|
}
|
|
201230
201230
|
|
|
201231
|
+
static void ReplaceAliases(ParsedExpression &expr, const ColumnList &list,
|
|
201232
|
+
const unordered_map<idx_t, string> &alias_map) {
|
|
201233
|
+
if (expr.type == ExpressionType::COLUMN_REF) {
|
|
201234
|
+
auto &colref = (ColumnRefExpression &)expr;
|
|
201235
|
+
D_ASSERT(!colref.IsQualified());
|
|
201236
|
+
auto &col_names = colref.column_names;
|
|
201237
|
+
D_ASSERT(col_names.size() == 1);
|
|
201238
|
+
auto idx_entry = list.GetColumnIndex(col_names[0]);
|
|
201239
|
+
auto &alias = alias_map.at(idx_entry.index);
|
|
201240
|
+
col_names = {alias};
|
|
201241
|
+
}
|
|
201242
|
+
ParsedExpressionIterator::EnumerateChildren(
|
|
201243
|
+
expr, [&](const ParsedExpression &child) { ReplaceAliases((ParsedExpression &)child, list, alias_map); });
|
|
201244
|
+
}
|
|
201245
|
+
|
|
201231
201246
|
static void BakeTableName(ParsedExpression &expr, const string &table_name) {
|
|
201232
201247
|
if (expr.type == ExpressionType::COLUMN_REF) {
|
|
201233
201248
|
auto &colref = (ColumnRefExpression &)expr;
|
|
@@ -201251,6 +201266,11 @@ unique_ptr<ParsedExpression> TableBinding::ExpandGeneratedColumn(const string &c
|
|
|
201251
201266
|
D_ASSERT(table_entry->columns.GetColumn(LogicalIndex(column_index)).Generated());
|
|
201252
201267
|
// Get a copy of the generated column
|
|
201253
201268
|
auto expression = table_entry->columns.GetColumn(LogicalIndex(column_index)).GeneratedExpression().Copy();
|
|
201269
|
+
unordered_map<idx_t, string> alias_map;
|
|
201270
|
+
for (auto &entry : name_map) {
|
|
201271
|
+
alias_map[entry.second] = entry.first;
|
|
201272
|
+
}
|
|
201273
|
+
ReplaceAliases(*expression, table_entry->columns, alias_map);
|
|
201254
201274
|
BakeTableName(*expression, alias);
|
|
201255
201275
|
return (expression);
|
|
201256
201276
|
}
|
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.2-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "f0ec7187be"
|
|
15
|
+
#define DUCKDB_VERSION "v0.5.2-dev2283"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|