Question 230
A business intelligence team shares reusable calculation logic between SQL warehouses and notebooks. An auditor must prove the outcome of Update the function body with explicit null behavior and add null-input tests for this requirement: A SQL function produces the wrong result for null arguments under business rules. Which test result is best?
Explanation
Correct Answer
The tested null and nonnull cases satisfy the documented contract directly measures whether Update the function body with explicit null behavior and add null-input tests achieved the requirement “A SQL function produces the wrong result for null arguments under business rules.” It checks the operating result rather than just a configured resource name.
Incorrect Answers
This signal belongs to the adjacent case “A function should not execute for teams that lack approval to use it,” whose remedy is Revoke its EXECUTE privilege from unauthorized principals. The observed result for the present requirement is The tested null and nonnull cases satisfy the documented contract.
The explain plan avoids an unnecessary Python execution operator pertains to a different control (Prefer the built-in expression over a custom Python UDF) and a different need (A built-in Spark SQL function already implements the required standard calculation). It cannot establish that Update the function body with explicit null behavior and add null-input tests met the stated goal.
That observation is a valid indicator for “Analysts need a reusable scalar currency normalization expression across several queries” when using Create a Unity Catalog SQL scalar function with explicit parameter and return types. The scenario instead tests “A SQL function produces the wrong result for null arguments under business rules”; the relevant result is The tested null and nonnull cases satisfy the documented contract.