JingsongLi commented on code in PR #7034:
URL: https://github.com/apache/paimon/pull/7034#discussion_r2686449095


##########
paimon-spark/paimon-spark-ut/src/test/java/org/apache/paimon/spark/SparkCatalogWithRestTest.java:
##########
@@ -237,6 +246,116 @@ public void testMapFunction() throws Exception {
         cleanFunction(functionName);
     }
 
+    @Test
+    public void testColumnMasking() {
+        spark.sql(
+                "CREATE TABLE t_column_masking (id INT, secret STRING, email 
STRING, phone STRING) TBLPROPERTIES"
+                        + " ('bucket'='1', 'bucket-key'='id', 
'file.format'='avro', 'query-auth.enabled'='true')");
+        spark.sql(
+                "INSERT INTO t_column_masking VALUES (1, 's1', 
'[email protected]', '12345678901'), (2, 's2', '[email protected]', 
'12345678902')");
+
+        // Test single column masking
+        Transform maskTransform =
+                new 
ConcatTransform(Collections.singletonList(BinaryString.fromString("****")));
+
+        Map<String, Transform> columnMasking = new HashMap<>();
+        columnMasking.put("secret", maskTransform);
+        restCatalogServer.setColumnMaskingAuth(

Review Comment:
   Also add case for row filtering.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to