GBase 8a, the analytical database from Chinese vendor GBASE, supports column-level data masking to keep sensitive values safe. But when a masked column is used in a WHERE filter, a GROUP BY, or an ORDER BY, does the engine work with the original value or the masked one? I ran a set of tests on a gbase cluster to find out.
Test Setup
A single-column numeric table using the default masking policy:
CREATE TABLE "testmask" ( "id" int ( 11 ) DEFAULT NULL MASKED WITH ( FUNCTION = 'DEFAULT()' ) )
Enter fullscreen mode
Exit fullscreen mode
5 rows of test data: 1, 2, 3, 4, 99.
Full Table Scan Without Masking Privileges
Every id comes back as 0 β the original values are hidden, exactly as expected.
gbase> select * from testmask; +------+ | id | +------+ | 0 | | 0 | | 0 | | 0 | | 0 | +------+ 5 rows in set (Elapsed: 00:00:00.02)
Enter fullscreen mode
Exit fullscreen mode
WHERE Equality on a Masked Column
id=1 returns 1 row .β¦