MCPcopy Create free account
hub / github.com/duckdb/duckdb / HandleCollations

Function HandleCollations

src/function/function_binder.cpp:419–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419static void HandleCollations(ClientContext &context, ScalarFunction &bound_function,
420 vector<unique_ptr<Expression>> &children) {
421 switch (bound_function.GetCollationHandling()) {
422 case FunctionCollationHandling::IGNORE_COLLATIONS:
423 // explicitly ignoring collation handling
424 break;
425 case FunctionCollationHandling::PROPAGATE_COLLATIONS:
426 PropagateCollations(context, bound_function, children);
427 break;
428 case FunctionCollationHandling::PUSH_COMBINABLE_COLLATIONS:
429 // first propagate, then push collations to the children
430 PushCollations(context, bound_function, children, CollationType::COMBINABLE_COLLATIONS);
431 break;
432 default:
433 throw InternalException("Unrecognized collation handling");
434 }
435}
436
437static void InferTemplateType(ClientContext &context, const LogicalType &source, const LogicalType &target,
438 case_insensitive_map_t<vector<LogicalType>> &bindings, const Expression &current_expr,

Callers 1

BindScalarFunctionMethod · 0.85

Calls 4

PropagateCollationsFunction · 0.85
PushCollationsFunction · 0.85
InternalExceptionClass · 0.85
GetCollationHandlingMethod · 0.80

Tested by

no test coverage detected