Update scalar UDF inlining requirements in documentation#10337
Update scalar UDF inlining requirements in documentation#10337simonsabin wants to merge 3 commits into
Conversation
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.
|
@simonsabin : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
There was a problem hiding this comment.
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). |
|
Learn Build status updates of commit 2e0af49: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Learn Build status updates of commit 705a24f: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
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. |
|
@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 status updates of commit efc0b15: ✅ Validation status: passed
For more details, please refer to the build report. |
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.