Skip to content

Update scalar UDF inlining requirements in documentation#10337

Open
simonsabin wants to merge 3 commits into
MicrosoftDocs:livefrom
simonsabin:patch-14
Open

Update scalar UDF inlining requirements in documentation#10337
simonsabin wants to merge 3 commits into
MicrosoftDocs:livefrom
simonsabin:patch-14

Conversation

@simonsabin
Copy link
Copy Markdown
Contributor

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.

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.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@simonsabin : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Fabric Data Warehouse guidance for scalar UDF usage by clarifying the inlining requirements and the user-facing error when requirements aren’t met.

Changes:

  • Reworded the [!IMPORTANT] note to link to inlineable scalar UDF requirements.
  • Documented the specific error message shown when scalar UDF execution isn’t available in-query.
  • Added a follow-up sentence about where non-inlineable scalar UDFs can still be used.

> [!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 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).
Comment thread docs/t-sql/statements/create-function-sql-data-warehouse.md Outdated
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 2e0af49:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/statements/create-function-sql-data-warehouse.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 705a24f:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/statements/create-function-sql-data-warehouse.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner
Copy link
Copy Markdown
Contributor

@WilliamDAssafMSFT

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label May 22, 2026
@WilliamDAssafMSFT
Copy link
Copy Markdown
Contributor

Thanks for taking the time to create this PR, @simonsabin. This edit removes the important concept that you can create non-inlineable UDFs and they might still work, but I do like the addition of the error message. Reviewing with the product group. Will make some changes. Likely, this won't go live until after the Build conference.

@simonsabin
Copy link
Copy Markdown
Contributor Author

@WilliamDAssafMSFT not sure I have removed that concept.

"Scalar UDFs that cannot be inlineable can be used outside of a query"

I'm 100% sure that, unlike in normal SQL for DW, in a query the function has to be inlineable.

It is super important to call out that that you can create a function that can be inlineable, as indicated by the dmvs, but if its used in a query in a way that doesn't allow inlining it will error.

The docs previously ONLY mentioned creating an inlinable function. There are soooo many restrictions about the query that make it not work it has to be called out.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit efc0b15:

✅ Validation status: passed

File Status Preview URL Details
docs/t-sql/statements/create-function-sql-data-warehouse.md ✅Succeeded

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants