Skip to content

Commit

Permalink
renamed parameter 'struct'extract' to distinguish between
Browse files Browse the repository at this point in the history
'struct_extract()' and  'struct_extract_at()'
  • Loading branch information
peter committed Dec 12, 2024
1 parent c266e0d commit 67fdae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/function/scalar/struct/struct_extract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static unique_ptr<FunctionData> StructExtractBind(ClientContext &context, Scalar
}

static unique_ptr<FunctionData> StructExtractBindInternal(ClientContext &context, ScalarFunction &bound_function,
vector<unique_ptr<Expression>> &arguments, bool by_pos) {
vector<unique_ptr<Expression>> &arguments, bool struct_extract) {
D_ASSERT(bound_function.arguments.size() == 2);
auto &child_type = arguments[0]->return_type;
if (child_type.id() == LogicalTypeId::UNKNOWN) {
Expand All @@ -99,7 +99,7 @@ static unique_ptr<FunctionData> StructExtractBindInternal(ClientContext &context
if (struct_children.empty()) {
throw InternalException("Can't extract something from an empty struct");
}
if (by_pos && !StructType::IsUnnamed(child_type)) {
if (struct_extract && !StructType::IsUnnamed(child_type)) {
throw BinderException(
"struct_extract with an integer key can only be used on unnamed structs, use a string key instead");
}
Expand Down

0 comments on commit 67fdae6

Please sign in to comment.