duckdb 0.3.3-dev1404.0 → 0.3.3-dev1418.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 +44 -16
- package/src/duckdb.hpp +2 -2
- package/src/parquet-amalgamation.cpp +35839 -35839
package/package.json
CHANGED
package/src/duckdb.cpp
CHANGED
|
@@ -57094,7 +57094,7 @@ string PhysicalComparisonJoin::ParamsToString() const {
|
|
|
57094
57094
|
string extra_info = JoinTypeToString(join_type) + "\n";
|
|
57095
57095
|
for (auto &it : conditions) {
|
|
57096
57096
|
string op = ExpressionTypeToOperator(it.comparison);
|
|
57097
|
-
extra_info += it.left->GetName() + op + it.right->GetName() + "\n";
|
|
57097
|
+
extra_info += it.left->GetName() + " " + op + " " + it.right->GetName() + "\n";
|
|
57098
57098
|
}
|
|
57099
57099
|
return extra_info;
|
|
57100
57100
|
}
|
|
@@ -130650,11 +130650,17 @@ unique_ptr<NodeStatistics> StatisticsPropagator::PropagateStatistics(LogicalJoin
|
|
|
130650
130650
|
}
|
|
130651
130651
|
|
|
130652
130652
|
auto join_type = join.join_type;
|
|
130653
|
+
// depending on the join type, we might need to alter the statistics
|
|
130654
|
+
// LEFT, FULL, RIGHT OUTER and SINGLE joins can introduce null values
|
|
130655
|
+
// this requires us to alter the statistics after this point in the query plan
|
|
130656
|
+
bool adds_null_on_left = IsRightOuterJoin(join_type);
|
|
130657
|
+
bool adds_null_on_right = IsLeftOuterJoin(join_type) || join_type == JoinType::SINGLE;
|
|
130658
|
+
|
|
130653
130659
|
vector<ColumnBinding> left_bindings, right_bindings;
|
|
130654
|
-
if (
|
|
130660
|
+
if (adds_null_on_left) {
|
|
130655
130661
|
left_bindings = join.children[0]->GetColumnBindings();
|
|
130656
130662
|
}
|
|
130657
|
-
if (
|
|
130663
|
+
if (adds_null_on_right) {
|
|
130658
130664
|
right_bindings = join.children[1]->GetColumnBindings();
|
|
130659
130665
|
}
|
|
130660
130666
|
|
|
@@ -130670,10 +130676,7 @@ unique_ptr<NodeStatistics> StatisticsPropagator::PropagateStatistics(LogicalJoin
|
|
|
130670
130676
|
break;
|
|
130671
130677
|
}
|
|
130672
130678
|
|
|
130673
|
-
|
|
130674
|
-
// LEFT, FULL and RIGHT OUTER joins can introduce null values
|
|
130675
|
-
// this requires us to alter the statistics after this point in the query plan
|
|
130676
|
-
if (IsLeftOuterJoin(join_type)) {
|
|
130679
|
+
if (adds_null_on_right) {
|
|
130677
130680
|
// left or full outer join: set IsNull() to true for all rhs statistics
|
|
130678
130681
|
for (auto &binding : right_bindings) {
|
|
130679
130682
|
auto stats = statistics_map.find(binding);
|
|
@@ -130682,7 +130685,7 @@ unique_ptr<NodeStatistics> StatisticsPropagator::PropagateStatistics(LogicalJoin
|
|
|
130682
130685
|
}
|
|
130683
130686
|
}
|
|
130684
130687
|
}
|
|
130685
|
-
if (
|
|
130688
|
+
if (adds_null_on_left) {
|
|
130686
130689
|
// right or full outer join: set IsNull() to true for all lhs statistics
|
|
130687
130690
|
for (auto &binding : left_bindings) {
|
|
130688
130691
|
auto stats = statistics_map.find(binding);
|
|
@@ -152654,7 +152657,7 @@ unique_ptr<ParsedExpression> ExpressionBinder::CreateStructExtract(unique_ptr<Pa
|
|
|
152654
152657
|
vector<unique_ptr<ParsedExpression>> children;
|
|
152655
152658
|
children.push_back(move(base));
|
|
152656
152659
|
children.push_back(make_unique_base<ParsedExpression, ConstantExpression>(Value(move(field_name))));
|
|
152657
|
-
auto extract_fun = make_unique<
|
|
152660
|
+
auto extract_fun = make_unique<OperatorExpression>(ExpressionType::STRUCT_EXTRACT, move(children));
|
|
152658
152661
|
return move(extract_fun);
|
|
152659
152662
|
}
|
|
152660
152663
|
|
|
@@ -153010,12 +153013,13 @@ BindResult ExpressionBinder::BindFunction(FunctionExpression &function, ScalarFu
|
|
|
153010
153013
|
vector<unique_ptr<Expression>> children;
|
|
153011
153014
|
for (idx_t i = 0; i < function.children.size(); i++) {
|
|
153012
153015
|
auto &child = (BoundExpression &)*function.children[i];
|
|
153016
|
+
D_ASSERT(child.expr);
|
|
153013
153017
|
children.push_back(move(child.expr));
|
|
153014
153018
|
}
|
|
153015
153019
|
unique_ptr<Expression> result =
|
|
153016
153020
|
ScalarFunction::BindScalarFunction(context, *func, move(children), error, function.is_operator);
|
|
153017
153021
|
if (!result) {
|
|
153018
|
-
|
|
153022
|
+
throw BinderException(binder.FormatError(function, error));
|
|
153019
153023
|
}
|
|
153020
153024
|
return BindResult(move(result));
|
|
153021
153025
|
}
|
|
@@ -153252,9 +153256,21 @@ BindResult ExpressionBinder::BindExpression(OperatorExpression &op, idx_t depth)
|
|
|
153252
153256
|
case ExpressionType::ARRAY_SLICE:
|
|
153253
153257
|
function_name = "array_slice";
|
|
153254
153258
|
break;
|
|
153255
|
-
case ExpressionType::STRUCT_EXTRACT:
|
|
153259
|
+
case ExpressionType::STRUCT_EXTRACT: {
|
|
153260
|
+
D_ASSERT(op.children.size() == 2);
|
|
153261
|
+
D_ASSERT(op.children[0]->expression_class == ExpressionClass::BOUND_EXPRESSION);
|
|
153262
|
+
D_ASSERT(op.children[1]->expression_class == ExpressionClass::BOUND_EXPRESSION);
|
|
153263
|
+
auto &extract_exp = (BoundExpression &)*op.children[0];
|
|
153264
|
+
auto &name_exp = (BoundExpression &)*op.children[1];
|
|
153265
|
+
if (extract_exp.expr->return_type.id() != LogicalTypeId::STRUCT &&
|
|
153266
|
+
extract_exp.expr->return_type.id() != LogicalTypeId::SQLNULL) {
|
|
153267
|
+
return BindResult(
|
|
153268
|
+
StringUtil::Format("Cannot extract field %s from expression \"%s\" because it is not a struct",
|
|
153269
|
+
name_exp.ToString(), extract_exp.ToString()));
|
|
153270
|
+
}
|
|
153256
153271
|
function_name = "struct_extract";
|
|
153257
153272
|
break;
|
|
153273
|
+
}
|
|
153258
153274
|
case ExpressionType::ARRAY_CONSTRUCTOR:
|
|
153259
153275
|
function_name = "list_value";
|
|
153260
153276
|
break;
|
|
@@ -161215,6 +161231,7 @@ string ExpressionBinder::Bind(unique_ptr<ParsedExpression> *expr, idx_t depth, b
|
|
|
161215
161231
|
|
|
161216
161232
|
|
|
161217
161233
|
|
|
161234
|
+
|
|
161218
161235
|
namespace duckdb {
|
|
161219
161236
|
|
|
161220
161237
|
void ExpressionIterator::EnumerateChildren(const Expression &expr,
|
|
@@ -161376,10 +161393,13 @@ void ExpressionIterator::EnumerateTableRefChildren(BoundTableRef &ref,
|
|
|
161376
161393
|
EnumerateQueryNodeChildren(*bound_subquery.subquery, callback);
|
|
161377
161394
|
break;
|
|
161378
161395
|
}
|
|
161379
|
-
|
|
161380
|
-
|
|
161381
|
-
|
|
161396
|
+
case TableReferenceType::TABLE_FUNCTION:
|
|
161397
|
+
case TableReferenceType::EMPTY:
|
|
161398
|
+
case TableReferenceType::BASE_TABLE:
|
|
161399
|
+
case TableReferenceType::CTE:
|
|
161382
161400
|
break;
|
|
161401
|
+
default:
|
|
161402
|
+
throw NotImplementedException("Unimplemented table reference type in ExpressionIterator");
|
|
161383
161403
|
}
|
|
161384
161404
|
}
|
|
161385
161405
|
|
|
@@ -161392,8 +161412,13 @@ void ExpressionIterator::EnumerateQueryNodeChildren(BoundQueryNode &node,
|
|
|
161392
161412
|
EnumerateQueryNodeChildren(*bound_setop.right, callback);
|
|
161393
161413
|
break;
|
|
161394
161414
|
}
|
|
161395
|
-
|
|
161396
|
-
|
|
161415
|
+
case QueryNodeType::RECURSIVE_CTE_NODE: {
|
|
161416
|
+
auto &cte_node = (BoundRecursiveCTENode &)node;
|
|
161417
|
+
EnumerateQueryNodeChildren(*cte_node.left, callback);
|
|
161418
|
+
EnumerateQueryNodeChildren(*cte_node.right, callback);
|
|
161419
|
+
break;
|
|
161420
|
+
}
|
|
161421
|
+
case QueryNodeType::SELECT_NODE: {
|
|
161397
161422
|
auto &bound_select = (BoundSelectNode &)node;
|
|
161398
161423
|
for (idx_t i = 0; i < bound_select.select_list.size(); i++) {
|
|
161399
161424
|
EnumerateExpression(bound_select.select_list[i], callback);
|
|
@@ -161417,6 +161442,9 @@ void ExpressionIterator::EnumerateQueryNodeChildren(BoundQueryNode &node,
|
|
|
161417
161442
|
}
|
|
161418
161443
|
break;
|
|
161419
161444
|
}
|
|
161445
|
+
default:
|
|
161446
|
+
throw NotImplementedException("Unimplemented query node in ExpressionIterator");
|
|
161447
|
+
}
|
|
161420
161448
|
for (idx_t i = 0; i < node.modifiers.size(); i++) {
|
|
161421
161449
|
switch (node.modifiers[i]->type) {
|
|
161422
161450
|
case ResultModifierType::DISTINCT_MODIFIER:
|
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.3.3-
|
|
14
|
+
#define DUCKDB_SOURCE_ID "a5b6279ed"
|
|
15
|
+
#define DUCKDB_VERSION "v0.3.3-dev1418"
|
|
16
16
|
//===----------------------------------------------------------------------===//
|
|
17
17
|
// DuckDB
|
|
18
18
|
//
|