veghlaci05 commented on code in PR #4626:
URL: https://github.com/apache/hive/pull/4626#discussion_r1304360481
##########
ql/src/test/queries/clientpositive/compaction_query_based_masking.q:
##########
@@ -0,0 +1,31 @@
+--! qt:replace:/createTime:(\d+)/#Masked#/
+--! qt:replace:/location:(\S+)/#Masked#/
+--! qt:replace:/lastAccessTime:(\d+)/#Masked#/
+--! qt:replace:/ownerType:(\S*)/#Masked#/
+--! qt:replace:/owner:(\S*)/#Masked#/
+--! qt:replace:/skewedColValueLocationMaps:(\S*)/#Masked#/
+--! qt:replace:/transient_lastDdlTime=(\d+)/#Masked#/
+--! qt:replace:/totalSize=(\d+)/#Masked#/
+--! qt:replace:/rawDataSize=(\d+)/#Masked#/
+--! qt:replace:/writeId:(\d+)/#Masked#/
+--! qt:replace:/bucketing_version=(\d+)/#Masked#/
+--! qt:replace:/id:(\d+)/#Masked#/
+
+
+set hive.mapred.mode=nonstrict;
+set hive.security.authorization.enabled=true;
+set
hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactoryForTest;
+
+drop table masking_test_n_compact;
+
+create table masking_test_n_compact (key int, value string) stored as orc
TBLPROPERTIES('transactional'='true');
+
+
+
+insert into masking_test_n_compact values('1', 'text1');
+insert into masking_test_n_compact values('2', 'text2');
+insert into masking_test_n_compact values('3', 'text3');
+
+alter table masking_test_n_compact compact 'MAJOR' and wait;
Review Comment:
Fixed both the qtest and the production code. The test now checks properly
if the data was written correctly or not: The test masking and filtering rules
are applied based on the table name, so renaming the table will remove it from
their scope. This way I can check before and after compaction if the table data
was corrupted or not.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]