@Override
  public List<HivePrivilegeObject> applyRowFilterAndColumnMasking(HiveAuthzContext context,
      List<HivePrivilegeObject> privObjs) throws SemanticException {
    outputHivePrivilegeObjects("applyRowFilterAndColumnMasking:", privObjs);
    List<HivePrivilegeObject> needRewritePrivObjs = new ArrayList<>(); 
    for (HivePrivilegeObject privObj : privObjs) {
      if (privObj.getObjectName().equals("masking_test") || privObj.getObjectName().startsWith("masking_test_n")) {
        privObj.setRowFilterExpression("key % 2 = 0 and key < 10");
        List<String> cellValueTransformers = new ArrayList<>();
        for (String columnName : privObj.getColumns()) {
          if (columnName.equals("value")) {
            cellValueTransformers.add("reverse(value)");
          } else {
            cellValueTransformers.add(columnName);
          }
        }
        privObj.setCellValueTransformers(cellValueTransformers);
        needRewritePrivObjs.add(privObj);
      } else if (privObj.getObjectName().equals("masking_test_view") || privObj.getObjectName().startsWith("masking_test_view_n")) {
        privObj.setRowFilterExpression("key > 6");
        List<String> cellValueTransformers = new ArrayList<>();
        for (String columnName : privObj.getColumns()) {
          if (columnName.equals("key")) {
            cellValueTransformers.add("key / 2");
          } else {
            cellValueTransformers.add(columnName);
          }
        }
        privObj.setCellValueTransformers(cellValueTransformers);
        needRewritePrivObjs.add(privObj);
      } else if (privObj.getObjectName().equals("masking_test_subq") || privObj.getObjectName().startsWith("masking_test_subq_n")) {
        privObj
            .setRowFilterExpression("key in (select key from src where src.key = " + privObj.getObjectName() + ".key)");
        needRewritePrivObjs.add(privObj);
      } else if (privObj.getObjectName().equals("masking_acid_no_masking") || privObj.getObjectName().startsWith("masking_acid_no_masking_n")) {
        // testing acid usage when no masking/filtering is present
        needRewritePrivObjs.add(privObj);
      } else if (privObj.getObjectName().equals("masking_test_druid") || privObj.getObjectName().startsWith("masking_test_druid_n")) {
        // testing druid queries row filtering is present
        privObj.setRowFilterExpression("key > 10");
        needRewritePrivObjs.add(privObj);
      }
    }
    return needRewritePrivObjs;
  }
Extends SQLStdHiveAuthorizationValidator to relax the restriction of not
being able to run dfs,set commands. To be used for testing purposes only!

In addition, it parses a setting test.hive.authz.sstd.validator.bypassObjTypes
as a comma-separated list of object types, which, if present, it will bypass
validations of all input and output objects of those types.
itests/util/src/main/java/org/apache/hadoop/hive/ql/security/authorization/plugin/sqlstd/SQLStdHiveAuthorizationValidatorForTest.java