@Test public void testCreateTableHPHash() { String sql = "CREATE TABLE orders_range\n" + "(\n" + "id INT PRIMARY KEY,\n" + "name VARCHAR(30),\n" + "order_date DATE\n" + ") PARTITION BY HASH(id) PARTITIONS 4"; Statement statement = parser.createStatement(sql); CreateTable ctstmt = (CreateTable) statement; QualifiedName name = ctstmt.getName(); System.out.println("prefix:" + (name.getPrefix().isPresent() ? name.getPrefix().get() : null)); System.out.println("suffix:" + name.getSuffix()); System.out.println("orignal part:"); name.getOriginalParts().forEach(System.out::println); System.out.println(statement.toString()); }
public Statement createStatement(String sql) { return (Statement) invokeParser("statement", sql, PardSqlBaseParser::singleStatement); }
SqlParser { public Statement createStatement(String sql) { return (Statement) invokeParser("statement", sql, PardSqlBaseParser::singleStatement); } }
SqlParser { public Statement createStatement(String sql) { return (Statement) invokeParser("statement", sql, PardSqlBaseParser::singleStatement); }  }
SqlParser { public Statement createStatement(String sql) { return (Statement) invokeParser("statement", sql, PardSqlBaseParser::singleStatement); }  Statement createStatement(String sql); Expression createExpression(String expression); }
SqlParser { public Statement createStatement(String sql) { return (Statement) invokeParser("statement", sql, PardSqlBaseParser::singleStatement); }  Statement createStatement(String sql); Expression createExpression(String expression);  }