From 2e0af4972a7c8cd38393105c0726228e8d095a25 Mon Sep 17 00:00:00 2001 From: Simon Sabin <1209963+simonsabin@users.noreply.github.com> Date: Fri, 22 May 2026 09:42:05 +0100 Subject: [PATCH 1/3] Update scalar UDF inlining requirements in documentation Make it way more obvious that the limitations for a function being inlined isn't just about the function but about the use of the function. Clarified requirements for scalar UDF inlining in Fabric Data Warehouse and noted usage limitations for non-inlineable UDFs. --- docs/t-sql/statements/create-function-sql-data-warehouse.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/t-sql/statements/create-function-sql-data-warehouse.md b/docs/t-sql/statements/create-function-sql-data-warehouse.md index ee965777ecc..bae17bdd6aa 100644 --- a/docs/t-sql/statements/create-function-sql-data-warehouse.md +++ b/docs/t-sql/statements/create-function-sql-data-warehouse.md @@ -26,7 +26,8 @@ monikerRange: ">=aps-pdw-2016 || =azure-sqldw-latest || =fabric" > Scalar UDFs are a preview feature in Fabric Data Warehouse. > [!IMPORTANT] -> In Fabric Data Warehouse, [scalar UDFs must be inlineable](#scalar-udf-inlining) for use with `SELECT ... FROM` queries on user tables, but you can still create functions that aren't inlineable. Scalar UDFs that are not inlineable work in limited number of scenarios. You can check [whether a UDF can be inlined](#check-whether-a-scalar-udf-can-be-inlined). +> In Fabric Data Warehouse, to use a scalar udf in a query it must follow the [rules to allow inlining](../../relational-databases/user-defined-functions/scalar-udf-inlining.md#inlineable-scalar-udf-requirements) otherwise you will get an error `Scalar UDF execution is currently unavailable in this context.`. +Scalar UDFs that cannot be inlineable can be used outside of a query. You can check [whether a UDF can be inlined](#check-whether-a-scalar-udf-can-be-inlined). A user-defined function is a [!INCLUDE [tsql](../../includes/tsql-md.md)] routine that accepts parameters, performs an action, such as a complex calculation, and returns the result of that action as a value. Scalar functions return a scalar value, such as a number or string. User-defined table-valued functions (TVFs) return a table. From 705a24f420452dd85bbb77e93940c63cdf0e7952 Mon Sep 17 00:00:00 2001 From: Simon Sabin <1209963+simonsabin@users.noreply.github.com> Date: Fri, 22 May 2026 09:43:04 +0100 Subject: [PATCH 2/3] Clarify rules for using scalar UDFs in queries --- docs/t-sql/statements/create-function-sql-data-warehouse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/t-sql/statements/create-function-sql-data-warehouse.md b/docs/t-sql/statements/create-function-sql-data-warehouse.md index bae17bdd6aa..d20c9f69c92 100644 --- a/docs/t-sql/statements/create-function-sql-data-warehouse.md +++ b/docs/t-sql/statements/create-function-sql-data-warehouse.md @@ -26,7 +26,7 @@ monikerRange: ">=aps-pdw-2016 || =azure-sqldw-latest || =fabric" > Scalar UDFs are a preview feature in Fabric Data Warehouse. > [!IMPORTANT] -> In Fabric Data Warehouse, to use a scalar udf in a query it must follow the [rules to allow inlining](../../relational-databases/user-defined-functions/scalar-udf-inlining.md#inlineable-scalar-udf-requirements) otherwise you will get an error `Scalar UDF execution is currently unavailable in this context.`. +> In Fabric Data Warehouse, to use a scalar udf in a query both the function and its use must follow the [rules to allow inlining](../../relational-databases/user-defined-functions/scalar-udf-inlining.md#inlineable-scalar-udf-requirements) otherwise you will get an error `Scalar UDF execution is currently unavailable in this context.`. Scalar UDFs that cannot be inlineable can be used outside of a query. You can check [whether a UDF can be inlined](#check-whether-a-scalar-udf-can-be-inlined). A user-defined function is a [!INCLUDE [tsql](../../includes/tsql-md.md)] routine that accepts parameters, performs an action, such as a complex calculation, and returns the result of that action as a value. Scalar functions return a scalar value, such as a number or string. User-defined table-valued functions (TVFs) return a table. From efc0b15bba6cb86e086efbf534af2fe4b541b776 Mon Sep 17 00:00:00 2001 From: Simon Sabin <1209963+simonsabin@users.noreply.github.com> Date: Fri, 22 May 2026 18:14:03 +0100 Subject: [PATCH 3/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docs/t-sql/statements/create-function-sql-data-warehouse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/t-sql/statements/create-function-sql-data-warehouse.md b/docs/t-sql/statements/create-function-sql-data-warehouse.md index d20c9f69c92..52725098708 100644 --- a/docs/t-sql/statements/create-function-sql-data-warehouse.md +++ b/docs/t-sql/statements/create-function-sql-data-warehouse.md @@ -26,8 +26,8 @@ monikerRange: ">=aps-pdw-2016 || =azure-sqldw-latest || =fabric" > Scalar UDFs are a preview feature in Fabric Data Warehouse. > [!IMPORTANT] -> In Fabric Data Warehouse, to use a scalar udf in a query both the function and its use must follow the [rules to allow inlining](../../relational-databases/user-defined-functions/scalar-udf-inlining.md#inlineable-scalar-udf-requirements) otherwise you will get an error `Scalar UDF execution is currently unavailable in this context.`. -Scalar UDFs that cannot be inlineable can be used outside of a query. You can check [whether a UDF can be inlined](#check-whether-a-scalar-udf-can-be-inlined). +> In Fabric Data Warehouse, a scalar UDF used in a query must follow the [rules to allow inlining](../../relational-databases/user-defined-functions/scalar-udf-inlining.md#inlineable-scalar-udf-requirements). Otherwise, you will get the error `Scalar UDF execution is currently unavailable in this context.`. +Scalar UDFs that cannot be inlined can be used outside of a query. You can check [whether a UDF can be inlined](#check-whether-a-scalar-udf-can-be-inlined). A user-defined function is a [!INCLUDE [tsql](../../includes/tsql-md.md)] routine that accepts parameters, performs an action, such as a complex calculation, and returns the result of that action as a value. Scalar functions return a scalar value, such as a number or string. User-defined table-valued functions (TVFs) return a table.