@Test public void canParseIndexNameWithSpecialCharQuoted() { assertNotNull(parser.parse("SELECT * FROM `hello+world`")); assertNotNull(parser.parse("SELECT * FROM \"hello$world\"")); }
public ParseTree parse(String query) { OpenDistroSQLLexer lexer = new OpenDistroSQLLexer(new CaseInsensitiveCharStream(query)); OpenDistroSQLParser parser = new OpenDistroSQLParser(new CommonTokenStream(lexer)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }
SQLSyntaxParser { public ParseTree parse(String query) { OpenDistroSQLLexer lexer = new OpenDistroSQLLexer(new CaseInsensitiveCharStream(query)); OpenDistroSQLParser parser = new OpenDistroSQLParser(new CommonTokenStream(lexer)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); } }
SQLSyntaxParser { public ParseTree parse(String query) { OpenDistroSQLLexer lexer = new OpenDistroSQLLexer(new CaseInsensitiveCharStream(query)); OpenDistroSQLParser parser = new OpenDistroSQLParser(new CommonTokenStream(lexer)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  }
SQLSyntaxParser { public ParseTree parse(String query) { OpenDistroSQLLexer lexer = new OpenDistroSQLLexer(new CaseInsensitiveCharStream(query)); OpenDistroSQLParser parser = new OpenDistroSQLParser(new CommonTokenStream(lexer)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  ParseTree parse(String query); }
SQLSyntaxParser { public ParseTree parse(String query) { OpenDistroSQLLexer lexer = new OpenDistroSQLLexer(new CaseInsensitiveCharStream(query)); OpenDistroSQLParser parser = new OpenDistroSQLParser(new CommonTokenStream(lexer)); parser.addErrorListener(new SyntaxAnalysisErrorListener()); return parser.root(); }  ParseTree parse(String query);  }