duckdb 0.5.2-dev843.0 → 0.5.2-dev849.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 +18 -7
- package/src/duckdb.hpp +685 -685
- package/src/parquet-amalgamation.cpp +37585 -37585
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -79185,12 +79185,6 @@ PhysicalUnnest::PhysicalUnnest(vector<LogicalType> types, vector<unique_ptr<Expr
|
|
|
79185
79185
|
}
|
|
79186
79186
|
|
|
79187
79187
|
static void UnnestNull(idx_t start, idx_t end, Vector &result) {
|
|
79188
|
-
if (result.GetType().InternalType() == PhysicalType::STRUCT) {
|
|
79189
|
-
auto &children = StructVector::GetEntries(result);
|
|
79190
|
-
for (auto &child : children) {
|
|
79191
|
-
UnnestNull(start, end, *child);
|
|
79192
|
-
}
|
|
79193
|
-
}
|
|
79194
79188
|
auto &validity = FlatVector::Validity(result);
|
|
79195
79189
|
for (idx_t i = start; i < end; i++) {
|
|
79196
79190
|
validity.SetInvalid(i);
|
|
@@ -179152,6 +179146,21 @@ void ExpressionBinder::QualifyColumnNames(Binder &binder, unique_ptr<ParsedExpre
|
|
|
179152
179146
|
|
|
179153
179147
|
unique_ptr<ParsedExpression> ExpressionBinder::CreateStructExtract(unique_ptr<ParsedExpression> base,
|
|
179154
179148
|
string field_name) {
|
|
179149
|
+
|
|
179150
|
+
// we need to transform the struct extract if it is inside a lambda expression
|
|
179151
|
+
// because we cannot bind to an existing table, so we remove the dummy table also
|
|
179152
|
+
if (lambda_bindings && base->type == ExpressionType::COLUMN_REF) {
|
|
179153
|
+
auto &lambda_column_ref = (ColumnRefExpression &)*base;
|
|
179154
|
+
D_ASSERT(!lambda_column_ref.column_names.empty());
|
|
179155
|
+
|
|
179156
|
+
if (lambda_column_ref.column_names[0].find(DummyBinding::DUMMY_NAME) != string::npos) {
|
|
179157
|
+
D_ASSERT(lambda_column_ref.column_names.size() == 2);
|
|
179158
|
+
auto lambda_param_name = lambda_column_ref.column_names.back();
|
|
179159
|
+
lambda_column_ref.column_names.clear();
|
|
179160
|
+
lambda_column_ref.column_names.push_back(lambda_param_name);
|
|
179161
|
+
}
|
|
179162
|
+
}
|
|
179163
|
+
|
|
179155
179164
|
vector<unique_ptr<ParsedExpression>> children;
|
|
179156
179165
|
children.push_back(move(base));
|
|
179157
179166
|
children.push_back(make_unique_base<ParsedExpression, ConstantExpression>(Value(move(field_name))));
|
|
@@ -179278,7 +179287,8 @@ BindResult ExpressionBinder::BindExpression(ColumnRefExpression &colref_p, idx_t
|
|
|
179278
179287
|
if (!expr) {
|
|
179279
179288
|
return BindResult(binder.FormatError(colref_p, error_message));
|
|
179280
179289
|
}
|
|
179281
|
-
|
|
179290
|
+
|
|
179291
|
+
// a generated column returns a generated expression, a struct on a column returns a struct extract
|
|
179282
179292
|
if (expr->type != ExpressionType::COLUMN_REF) {
|
|
179283
179293
|
auto alias = expr->alias;
|
|
179284
179294
|
auto result = BindExpression(&expr, depth);
|
|
@@ -179287,6 +179297,7 @@ BindResult ExpressionBinder::BindExpression(ColumnRefExpression &colref_p, idx_t
|
|
|
179287
179297
|
}
|
|
179288
179298
|
return result;
|
|
179289
179299
|
}
|
|
179300
|
+
|
|
179290
179301
|
auto &colref = (ColumnRefExpression &)*expr;
|
|
179291
179302
|
D_ASSERT(colref.IsQualified());
|
|
179292
179303
|
auto &table_name = colref.GetTableName();
|