You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via http://sqlfiddle.com
What is the expected behavior?
Additional flag for computed column UDFs because it may not be obvious where they're used if you look at just the query text.
Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
All
The text was updated successfully, but these errors were encountered:
This will look a lot like the code that catches functions, except we'll filter down to where a computed column is referenced.
WITH XMLNAMESPACES('http://schemas.microsoft.com/sqlserver/2004/07/showplan' AS p)
SELECT qs.QueryHash,
n.fn.value('count(distinct-values(//p:UserDefinedFunction[not(@IsClrFunction)]))', 'INT') AS function_count
FROM #relop qs
CROSS APPLY relop.nodes('/p:RelOp/p:ComputeScalar/p:DefinedValues/p:DefinedValue/p:ScalarOperator') n(fn)
WHERE n.fn.exist('/p:RelOp/p:ComputeScalar/p:DefinedValues/p:DefinedValue/p:ColumnReference[(@ComputedColumn[.="1"])]') = 1
OPTION (RECOMPILE)
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
We find compute scalar operators that reference scalar UDFs, but we can also detect if they're in computed columns
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via http://sqlfiddle.com
What is the expected behavior?
Additional flag for computed column UDFs because it may not be obvious where they're used if you look at just the query text.
Which versions of SQL Server and which OS are affected by this issue? Did this work in previous versions of our procedures?
All
The text was updated successfully, but these errors were encountered: