Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EFCore.Relational/Query/ISqlExpressionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ SqlFunctionExpression Function(
/// <param name="typeMapping"> The <see cref="RelationalTypeMapping" /> associated with the expression. </param>
/// <returns> An expression representing a function call in a SQL tree. </returns>
SqlFunctionExpression Function(
[NotNull] string schema,
[CanBeNull] string? schema,
[NotNull] string name,
[NotNull] IEnumerable<SqlExpression> arguments,
bool nullable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,7 @@ public RelationalMethodCallTranslatorProvider([NotNull] RelationalMethodCallTran

var argumentsPropagateNullability = dbFunction.Parameters.Select(p => p.PropagatesNullability);

if (dbFunction.IsBuiltIn)
{
return _sqlExpressionFactory.Function(
dbFunction.Name,
arguments,
dbFunction.IsNullable,
argumentsPropagateNullability,
method.ReturnType.UnwrapNullableType());
}

return dbFunction.Schema is null
return dbFunction.IsBuiltIn
? _sqlExpressionFactory.Function(
dbFunction.Name,
arguments,
Expand Down
4 changes: 2 additions & 2 deletions src/EFCore.Relational/Query/SqlExpressionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -636,15 +636,15 @@ public virtual SqlFunctionExpression Function(

/// <inheritdoc />
public virtual SqlFunctionExpression Function(
string schema,
string? schema,
string name,
IEnumerable<SqlExpression> arguments,
bool nullable,
IEnumerable<bool> argumentsPropagateNullability,
Type returnType,
RelationalTypeMapping? typeMapping = null)
{
Check.NotNull(schema, nameof(schema));
Check.NullButNotEmpty(schema, nameof(schema));
Check.NotEmpty(name, nameof(name));
Check.NotNull(arguments, nameof(arguments));
Check.NotNull(argumentsPropagateNullability, nameof(argumentsPropagateNullability));
Expand Down