Skip to content

Commit 25c7873

Browse files
Update vendored DuckDB sources to 2e8ebca
1 parent 2e8ebca commit 25c7873

File tree

197 files changed

+707
-617
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+707
-617
lines changed

src/duckdb/extension/core_functions/scalar/generic/alias.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace duckdb {
55

66
static void AliasFunction(DataChunk &args, ExpressionState &state, Vector &result) {
77
auto &func_expr = state.expr.Cast<BoundFunctionExpression>();
8-
Value v(state.expr.alias.empty() ? func_expr.children[0]->GetName() : state.expr.alias);
8+
Value v(state.expr.GetAlias().empty() ? func_expr.children[0]->GetName() : state.expr.GetAlias());
99
result.Reference(v);
1010
}
1111

src/duckdb/extension/core_functions/scalar/generic/least.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ unique_ptr<FunctionData> BindLeastGreatest(ClientContext &context, ScalarFunctio
179179
for (idx_t i = 1; i < arguments.size(); i++) {
180180
auto arg_type = ExpressionBinder::GetExpressionReturnType(*arguments[i]);
181181
if (!LogicalType::TryGetMaxLogicalType(context, child_type, arg_type, child_type)) {
182-
throw BinderException(arguments[i]->query_location,
182+
throw BinderException(arguments[i]->GetQueryLocation(),
183183
"Cannot combine types of %s and %s - an explicit cast is required",
184184
child_type.ToString(), arg_type.ToString());
185185
}

src/duckdb/extension/core_functions/scalar/list/list_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ static unique_ptr<FunctionData> ListFilterBind(ClientContext &context, ScalarFun
1010

1111
// the list column and the bound lambda expression
1212
D_ASSERT(arguments.size() == 2);
13-
if (arguments[1]->expression_class != ExpressionClass::BOUND_LAMBDA) {
13+
if (arguments[1]->GetExpressionClass() != ExpressionClass::BOUND_LAMBDA) {
1414
throw BinderException("Invalid lambda expression!");
1515
}
1616

src/duckdb/extension/core_functions/scalar/list/list_reduce.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static unique_ptr<FunctionData> ListReduceBind(ClientContext &context, ScalarFun
184184

185185
// the list column and the bound lambda expression
186186
D_ASSERT(arguments.size() == 2);
187-
if (arguments[1]->expression_class != ExpressionClass::BOUND_LAMBDA) {
187+
if (arguments[1]->GetExpressionClass() != ExpressionClass::BOUND_LAMBDA) {
188188
throw BinderException("Invalid lambda expression!");
189189
}
190190

src/duckdb/extension/core_functions/scalar/list/list_transform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ static unique_ptr<FunctionData> ListTransformBind(ClientContext &context, Scalar
1010

1111
// the list column and the bound lambda expression
1212
D_ASSERT(arguments.size() == 2);
13-
if (arguments[1]->expression_class != ExpressionClass::BOUND_LAMBDA) {
13+
if (arguments[1]->GetExpressionClass() != ExpressionClass::BOUND_LAMBDA) {
1414
throw BinderException("Invalid lambda expression!");
1515
}
1616

src/duckdb/extension/core_functions/scalar/list/list_value.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ static unique_ptr<FunctionData> ListValueBind(ClientContext &context, ScalarFunc
156156
auto error =
157157
StringUtil::Format("Cannot unpivot columns of types %s and %s - an explicit cast is required",
158158
child_type.ToString(), arg_type.ToString());
159-
throw BinderException(arguments[i]->query_location,
159+
throw BinderException(arguments[i]->GetQueryLocation(),
160160
QueryErrorContext::Format(list_arguments, error, error_index, false));
161161
} else {
162-
throw BinderException(arguments[i]->query_location,
162+
throw BinderException(arguments[i]->GetQueryLocation(),
163163
"Cannot create a list of types %s and %s - an explicit cast is required",
164164
child_type.ToString(), arg_type.ToString());
165165
}

src/duckdb/extension/core_functions/scalar/struct/struct_insert.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ static unique_ptr<FunctionData> StructInsertBind(ClientContext &context, ScalarF
5858
// Loop through the additional arguments (name/value pairs)
5959
for (idx_t i = 1; i < arguments.size(); i++) {
6060
auto &child = arguments[i];
61-
if (child->alias.empty()) {
61+
if (child->GetAlias().empty()) {
6262
throw BinderException("Need named argument for struct insert, e.g., a := b");
6363
}
64-
if (name_collision_set.find(child->alias) != name_collision_set.end()) {
65-
throw BinderException("Duplicate struct entry name \"%s\"", child->alias);
64+
if (name_collision_set.find(child->GetAlias()) != name_collision_set.end()) {
65+
throw BinderException("Duplicate struct entry name \"%s\"", child->GetAlias());
6666
}
67-
name_collision_set.insert(child->alias);
68-
new_children.push_back(make_pair(child->alias, arguments[i]->return_type));
67+
name_collision_set.insert(child->GetAlias());
68+
new_children.push_back(make_pair(child->GetAlias(), arguments[i]->return_type));
6969
}
7070

7171
bound_function.return_type = LogicalType::STRUCT(new_children);

src/duckdb/extension/core_functions/scalar/union/union_value.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ static unique_ptr<FunctionData> UnionValueBind(ClientContext &context, ScalarFun
4444
}
4545
auto &child = arguments[0];
4646

47-
if (child->alias.empty()) {
47+
if (child->GetAlias().empty()) {
4848
throw BinderException("Need named argument for union tag, e.g. UNION_VALUE(a := b)");
4949
}
5050

5151
child_list_t<LogicalType> union_members;
5252

53-
union_members.push_back(make_pair(child->alias, child->return_type));
53+
union_members.push_back(make_pair(child->GetAlias(), child->return_type));
5454

5555
bound_function.return_type = LogicalType::UNION(std::move(union_members));
5656
return make_uniq<VariableReturnBindData>(bound_function.return_type);

src/duckdb/extension/json/json_functions/copy_json.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static BoundStatement CopyToJSONPlan(Binder &binder, CopyStatement &stmt) {
9191
strftime_children.emplace_back(make_uniq<ConstantExpression>(timestamp_format));
9292
column = make_uniq<FunctionExpression>("strftime", std::move(strftime_children));
9393
}
94-
column->alias = name;
94+
column->SetAlias(name);
9595
select_list.emplace_back(std::move(column));
9696
}
9797

src/duckdb/extension/json/json_functions/json_serialize_plan.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,33 +63,34 @@ static unique_ptr<FunctionData> JsonSerializePlanBind(ClientContext &context, Sc
6363
if (!arg->IsFoldable()) {
6464
throw BinderException("json_serialize_plan: arguments must be constant");
6565
}
66-
if (arg->alias == "skip_null") {
66+
auto &alias = arg->GetAlias();
67+
if (alias == "skip_null") {
6768
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
6869
throw BinderException("json_serialize_plan: 'skip_null' argument must be a boolean");
6970
}
7071
skip_if_null = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
71-
} else if (arg->alias == "skip_empty") {
72+
} else if (alias == "skip_empty") {
7273
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
7374
throw BinderException("json_serialize_plan: 'skip_empty' argument must be a boolean");
7475
}
7576
skip_if_empty = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
76-
} else if (arg->alias == "skip_default") {
77+
} else if (alias == "skip_default") {
7778
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
7879
throw BinderException("json_serialize_plan: 'skip_default' argument must be a boolean");
7980
}
8081
skip_if_default = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
81-
} else if (arg->alias == "format") {
82+
} else if (alias == "format") {
8283
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
8384
throw BinderException("json_serialize_plan: 'format' argument must be a boolean");
8485
}
8586
format = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
86-
} else if (arg->alias == "optimize") {
87+
} else if (alias == "optimize") {
8788
if (arg->return_type.id() != LogicalTypeId::BOOLEAN) {
8889
throw BinderException("json_serialize_plan: 'optimize' argument must be a boolean");
8990
}
9091
optimize = BooleanValue::Get(ExpressionExecutor::EvaluateScalar(context, *arg));
9192
} else {
92-
throw BinderException(StringUtil::Format("json_serialize_plan: Unknown argument '%s'", arg->alias.c_str()));
93+
throw BinderException(StringUtil::Format("json_serialize_plan: Unknown argument '%s'", alias));
9394
}
9495
}
9596
return make_uniq<JsonSerializePlanBindData>(skip_if_null, skip_if_empty, skip_if_default, format, optimize);

0 commit comments

Comments
 (0)