@Test public void testName() throws Exception { String sql = "select selami:timestamp, melami:varchar from deneme where ali:timestamp is not null and veli is null group by demo"; SqlParserOptions options = new SqlParserOptions().allowIdentifierSymbol(IdentifierSymbol.COLON); Statement statement = new SqlParser(options).createStatement(sql); String s = RakamSqlFormatter.formatSql(statement, name -> String.format("(SELECT * FROM events WHERE collection_name = '%s')", name.toString()), name -> "\"$data\"['" + name + "']", '"'); System.out.println(s); }
public PrestoServer() { this(new SqlParserOptions()); }
public PrestoServer(SqlParserOptions sqlParserOptions) { this.sqlParserOptions = requireNonNull(sqlParserOptions, "sqlParserOptions is null"); }
public ServerMainModule(SqlParserOptions sqlParserOptions) { this.sqlParserOptions = requireNonNull(sqlParserOptions, "sqlParserOptions is null"); }