4.3 Redaction Results for Queries with SQL Expressions and Set Operation When Using Columns With Redaction Policies

If a SQL expression is present in the SELECT list of query involving columns with redaction policies, the result of the SQL expression will always be fully redacted. The redaction type specified by the user using the function_type parameter will not be used to redact the data.

Full redaction is always performed on the result of a SQL expression as it supports the most datatypes.

If the resulting datatype of a SQL expression is not supported by full redaction, NULL will be returned as the result.

If SQL expressions or SET operations are used on columns with Data Redaction policies, the redaction type for the result will default to FULL regardless of the underlying redaction types.

For example, if c1 has a random redaction type and c2 has a partial redaction type, then the result of the SUM or UNION operation will return a fully redacted value.

Example 4-3 SUM SQL Expression

select sum(c1,c2) from t1 order by c1;

Example 4-4 SET Operation

select c1 from t1 UNION select c2 from t2;

Regardless of the individual redaction type used, Data Redaction will fully redact the result of the SQL expression or SET operation.