public static String removePrefixFromWarehouseConfig(String origiKey) {
    String prefix = SessionState.get().getConf().getVar(HiveConf.ConfVars.METASTORE_WAREHOUSE);
    if (StringUtils.isNotBlank(prefix)) {
      //Local file system is using pfile:/// {@link ProxyLocalFileSystem}
      prefix = prefix.replace("pfile:///", "pfile:/");
      int index = origiKey.indexOf(prefix);
      if (index > -1) {
        origiKey = origiKey.substring(index + prefix.length());
      }
    }
    return origiKey;
  }
Remove prefix from "Path -&gt; Alias"
This is required for testing.
In order to verify that path is right, we need to display it in expected test result.
But, mask pattern masks path with some patterns.
So, we need to remove prefix from path which triggers mask pattern.
@param origiKey
@return
ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java