@Test
  public void testUnionAll() throws ParseException {
    parse("select * from (select * from \"c/b/o_t1\" order by key, c_boolean, value, dt)a union all select * from (select * from \"//cbo_t2\" order by key, c_boolean, value, dt)b");
    parse("select key from (select key, c_int from (select * from \"c/b/o_t1\" union all select * from \"//cbo_t2\" where \"//cbo_t2\".key >=0)r1 union all select key, c_int from \"cbo_/t3////\")r2 where key >=0 order by key");
    parse("select r2.key from (select key, c_int from (select key, c_int from \"c/b/o_t1\" union all select key, c_int from \"cbo_/t3////\" )r1 union all select key, c_int from \"cbo_/t3////\")r2 join   (select key, c_int from (select * from \"c/b/o_t1\" union all select * from \"//cbo_t2\" where \"//cbo_t2\".key >=0)r1 union all select key, c_int from \"cbo_/t3////\")r3 on r2.key=r3.key where r3.key >=0 order by r2.key");
  }
Parser tests special character in table names.
parser/src/test/org/apache/hadoop/hive/ql/parse/TestSpecialCharacterInTableNamesQuotes.java