@Test
public void generateUDTFClause() {

    String clause = UDFHelper.generateUDTFClause(
        "input", "func", new String[]{"c1", "c2"}, new String[]{"c0", "c1"}, new String[]{"c0", "c1", "c2"});
    String pattern = "SELECT `c0`, `c1_[0-9a-z]{32}` as `c1`, `c2_[0-9a-z]{32}` as `c2` FROM \\(" +
        "SELECT `c0`,`c1_[0-9a-z]{32}`,`c2_[0-9a-z]{32}` FROM input, " +
        "LATERAL TABLE\\(func\\(`c0`,`c1`\\)\\) as T\\(`c1_[0-9a-z]{32}`,`c2_[0-9a-z]{32}`\\)" +
        "\\)";
    assertTrue(clause.matches(pattern));
}