public String getAliasForTableName(String tableName) {
   for (String alias : qb.getTabAliases()) {
     String table = qb.getTabNameForAlias(alias);
     if (table != null && table.equalsIgnoreCase(tableName)) {
       return alias;
     }
   }
   // get alias from cubeTbls
   for (Map.Entry<String, AbstractCubeTable> cubeTblEntry : cubeTbls.entrySet()) {
     if (cubeTblEntry.getValue().getName().equalsIgnoreCase(tableName)) {
       return cubeTblEntry.getKey();
     }
   }
   return tableName.toLowerCase();
 }