mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修正运算符优先级别处理不当的问题
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@160 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -98,6 +98,10 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
case FALSE:
|
||||
lexer.nextToken();
|
||||
return primaryRest(new MySqlBooleanExpr(false));
|
||||
case LITERAL_ALIAS:
|
||||
String aliasValue = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
return primaryRest(new SQLCharExpr(aliasValue));
|
||||
default:
|
||||
return super.primary();
|
||||
}
|
||||
|
||||
@@ -102,8 +102,10 @@ public class MySqlLexer extends Lexer {
|
||||
map.put("LOCK", Token.LOCK);
|
||||
map.put("SOME", Token.SOME);
|
||||
map.put("ANY", Token.ANY);
|
||||
|
||||
map.put("TRUE", Token.TRUE);
|
||||
map.put("FALSE", Token.FALSE);
|
||||
map.put("LIMIT", Token.LIMIT);
|
||||
|
||||
DEFAULT_MYSQL_KEYWORDS = new Keywords(map);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,41 @@ public class MySqlSelectParser extends SQLSelectParser {
|
||||
this(new MySqlLexer(sql));
|
||||
this.lexer.nextToken();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final String as() throws ParserException {
|
||||
String rtnValue = null;
|
||||
|
||||
if (lexer.token() == Token.AS) {
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() == Token.LITERAL_ALIAS) {
|
||||
rtnValue = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.IDENTIFIER) {
|
||||
rtnValue = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
throw new ParserException("Error", 0, 0);
|
||||
}
|
||||
|
||||
if (lexer.token() == Token.LITERAL_ALIAS) {
|
||||
rtnValue = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
} else if (lexer.token() == Token.IDENTIFIER) {
|
||||
rtnValue = lexer.stringVal();
|
||||
lexer.nextToken();
|
||||
} else if (lexer.token() == Token.LITERAL_CHARS) {
|
||||
rtnValue = "'" + lexer.stringVal() + "'";
|
||||
lexer.nextToken();
|
||||
}
|
||||
return rtnValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SQLSelectQuery query() throws ParserException {
|
||||
@@ -164,7 +199,7 @@ public class MySqlSelectParser extends SQLSelectParser {
|
||||
|
||||
queryBlock.setOrderBy(this.createExprParser().parseOrderBy());
|
||||
|
||||
if (identifierEquals("LIMIT")) {
|
||||
if (lexer.token() == Token.LIMIT) {
|
||||
lexer.nextToken();
|
||||
|
||||
MySqlSelectQueryBlock.Limit limit = new MySqlSelectQueryBlock.Limit();
|
||||
|
||||
@@ -129,7 +129,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
deleteStatement.setOrderBy(orderBy);
|
||||
}
|
||||
|
||||
if (identifierEquals("LIMIT")) {
|
||||
if (lexer.token() == Token.LIMIT) {
|
||||
lexer.nextToken();
|
||||
|
||||
MySqlSelectQueryBlock.Limit limit = new MySqlSelectQueryBlock.Limit();
|
||||
@@ -317,7 +317,7 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
private MySqlShowWarningsStatement parseShowWarnings() throws ParserException {
|
||||
MySqlShowWarningsStatement stmt = new MySqlShowWarningsStatement();
|
||||
|
||||
if (identifierEquals("LIMIT")) {
|
||||
if (lexer.token() == Token.LIMIT) {
|
||||
lexer.nextToken();
|
||||
|
||||
MySqlSelectQueryBlock.Limit limit = new MySqlSelectQueryBlock.Limit();
|
||||
@@ -771,6 +771,11 @@ public class MySqlStatementParser extends SQLStatementParser {
|
||||
|
||||
SQLName tableName = this.exprParser.name();
|
||||
insertStatement.setTableName(tableName);
|
||||
|
||||
if (lexer.token() == Token.IDENTIFIER) {
|
||||
insertStatement.setAlias(lexer.stringVal());
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.LPAREN)) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -189,7 +189,7 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
}
|
||||
|
||||
if (select.getLimit() != null) {
|
||||
print(" ");
|
||||
println();
|
||||
select.getLimit().accept(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.alibaba.druid.sql.dialect.oracle.ast.expr;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLExprImpl;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.visitor.OracleASTVisitor;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class OraclePriorExpr extends SQLExprImpl {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private SQLExpr expr;
|
||||
|
||||
public OraclePriorExpr() {
|
||||
|
||||
}
|
||||
|
||||
public OraclePriorExpr(SQLExpr expr) {
|
||||
this.expr = expr;
|
||||
}
|
||||
|
||||
public SQLExpr getExpr() {
|
||||
return expr;
|
||||
}
|
||||
|
||||
public void setExpr(SQLExpr expr) {
|
||||
this.expr = expr;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
accept0((OracleASTVisitor) visitor);
|
||||
}
|
||||
|
||||
protected void accept0(OracleASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
acceptChild(visitor, expr);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
}
|
||||
+13
-4
@@ -18,6 +18,7 @@ package com.alibaba.druid.sql.dialect.oracle.ast.stmt;
|
||||
import com.alibaba.druid.sql.ast.SQLOrderingSpecification;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.visitor.OracleASTVisitor;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class OracleSelectOrderByItem extends SQLSelectOrderByItem {
|
||||
|
||||
@@ -36,6 +37,10 @@ public class OracleSelectOrderByItem extends SQLSelectOrderByItem {
|
||||
public void setNullsOrderType(NullsOrderType nullsOrderType) {
|
||||
this.nullsOrderType = nullsOrderType;
|
||||
}
|
||||
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
accept0((OracleASTVisitor) visitor);
|
||||
}
|
||||
|
||||
protected void accept0(OracleASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
@@ -47,12 +52,16 @@ public class OracleSelectOrderByItem extends SQLSelectOrderByItem {
|
||||
|
||||
public void output(StringBuffer buf) {
|
||||
this.expr.output(buf);
|
||||
if (SQLOrderingSpecification.ASC.equals(this.type)) buf.append(" ASC");
|
||||
else if (SQLOrderingSpecification.DESC.equals(this.type)) {
|
||||
if (SQLOrderingSpecification.ASC.equals(this.type)) {
|
||||
buf.append(" ASC");
|
||||
} else if (SQLOrderingSpecification.DESC.equals(this.type)) {
|
||||
buf.append(" DESC");
|
||||
}
|
||||
if (NullsOrderType.NullsFirst.equals(this.nullsOrderType)) buf.append(" NULLS FIRST");
|
||||
else if (NullsOrderType.NullsLast.equals(this.nullsOrderType)) buf.append(" NULLS LAST");
|
||||
if (NullsOrderType.NullsFirst.equals(this.nullsOrderType)) {
|
||||
buf.append(" NULLS FIRST");
|
||||
} else if (NullsOrderType.NullsLast.equals(this.nullsOrderType)) {
|
||||
buf.append(" NULLS LAST");
|
||||
}
|
||||
}
|
||||
|
||||
public static enum NullsOrderType {
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleGroupComparisonCondit
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleGroupingSetsExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleOuterExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OraclePriorExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OraclePriorIdentifierExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleTableCollectionExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleTimestampExpr;
|
||||
@@ -333,4 +334,8 @@ public interface OracleASTVisitor extends SQLASTVisitor {
|
||||
boolean visit(GroupingSetExpr x);
|
||||
|
||||
void endVisit(GroupingSetExpr x);
|
||||
|
||||
boolean visit(OraclePriorExpr x);
|
||||
|
||||
void endVisit(OraclePriorExpr x);
|
||||
}
|
||||
|
||||
+13
@@ -47,6 +47,7 @@ import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleGroupComparisonCondit
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleGroupingSetsExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleOuterExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OraclePriorExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OraclePriorIdentifierExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleTableCollectionExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleTimestampExpr;
|
||||
@@ -1576,4 +1577,16 @@ public class OracleOutputVisitor extends SQLASTOutputVisitor implements OracleAS
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean visit(OraclePriorExpr x) {
|
||||
print("PRIOR ");
|
||||
x.getExpr().accept(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endVisit(OraclePriorExpr x) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+56
@@ -2,8 +2,13 @@ package com.alibaba.druid.sql.dialect.oracle.ast.visitor;
|
||||
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLBinaryOperator;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLCharExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLInListExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLIntegerExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLLiteralExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLNCharExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLNumberExpr;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr;
|
||||
|
||||
public class OracleParameterizedOutputVisitor extends OracleOutputVisitor {
|
||||
@@ -12,6 +17,37 @@ public class OracleParameterizedOutputVisitor extends OracleOutputVisitor {
|
||||
super(appender);
|
||||
}
|
||||
|
||||
public void println() {
|
||||
print(' ');
|
||||
}
|
||||
|
||||
public boolean visit(SQLInListExpr x) {
|
||||
x.getExpr().accept(this);
|
||||
|
||||
if (x.isNot()) {
|
||||
print(" NOT IN (##)");
|
||||
} else {
|
||||
print(" IN (##)");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLBinaryOpExpr x) {
|
||||
if (x.getLeft() instanceof SQLLiteralExpr && x.getRight() instanceof SQLLiteralExpr) {
|
||||
print(x.getLeft().toString());
|
||||
print(' ');
|
||||
print(x.getOperator().name);
|
||||
print(' ');
|
||||
print(x.getRight().toString());
|
||||
return false;
|
||||
}
|
||||
|
||||
x = merge(x);
|
||||
|
||||
return super.visit(x);
|
||||
}
|
||||
|
||||
public SQLBinaryOpExpr merge(SQLBinaryOpExpr x) {
|
||||
if (x.getRight() instanceof SQLLiteralExpr) {
|
||||
x = new SQLBinaryOpExpr(x.getLeft(), x.getOperator(), new SQLVariantRefExpr("?"));
|
||||
@@ -52,5 +88,25 @@ public class OracleParameterizedOutputVisitor extends OracleOutputVisitor {
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
public boolean visit(SQLIntegerExpr x) {
|
||||
print('?');
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLNumberExpr x) {
|
||||
print('?');
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLCharExpr x) {
|
||||
print('?');
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean visit(SQLNCharExpr x) {
|
||||
print('?');
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleAnalytic;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleAnalyticWindowing;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleIntervalType;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.expr.OraclePriorExpr;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.parser.Lexer;
|
||||
import com.alibaba.druid.sql.parser.ParserException;
|
||||
@@ -89,6 +90,13 @@ public class OracleExprParser extends SQLExprParser {
|
||||
} else {
|
||||
throw new ParserException("syntax error : " + lexer.token());
|
||||
}
|
||||
case PRIOR:
|
||||
lexer.nextToken();
|
||||
primaryRest(new OraclePriorExpr(expr()));
|
||||
case LITERAL_ALIAS:
|
||||
String alias = '"' + lexer.stringVal() + '"';
|
||||
lexer.nextToken();
|
||||
return primaryRest(new SQLIdentifierExpr(alias));
|
||||
default:
|
||||
return super.primary();
|
||||
}
|
||||
@@ -157,7 +165,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
exprList(over.getPartitionBy());
|
||||
accept(Token.RPAREN);
|
||||
} else {
|
||||
over.getPartitionBy().add(expr());
|
||||
exprList(over.getPartitionBy());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,14 +248,15 @@ public class OracleExprParser extends SQLExprParser {
|
||||
}
|
||||
|
||||
if (identifierEquals("NULLS")) {
|
||||
if (lexer.stringVal().equalsIgnoreCase("FIRST")) {
|
||||
lexer.nextToken();
|
||||
if (identifierEquals("FIRST")) {
|
||||
lexer.nextToken();
|
||||
item.setNullsOrderType(OracleSelectOrderByItem.NullsOrderType.NullsFirst);
|
||||
} else if (lexer.stringVal().equalsIgnoreCase("LAST")) {
|
||||
} else if (identifierEquals("LAST")) {
|
||||
lexer.nextToken();
|
||||
item.setNullsOrderType(OracleSelectOrderByItem.NullsOrderType.NullsLast);
|
||||
} else {
|
||||
throw new ParserException("TODO");
|
||||
throw new ParserException("TODO " + lexer.token());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectGroupByClause;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectQuery;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLTableSource;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionOperator;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLUnionQuery;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.OracleHint;
|
||||
import com.alibaba.druid.sql.dialect.oracle.ast.clause.FlashbackQueryClause.AsOfFlashbackQueryClause;
|
||||
@@ -145,10 +146,13 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
|
||||
if (lexer.token() == (Token.DISTINCT)) {
|
||||
queryBlock.setDistionOption(SQLSetQuantifier.DISTINCT);
|
||||
lexer.nextToken();
|
||||
} else if (lexer.token() == (Token.UNIQUE)) {
|
||||
queryBlock.setDistionOption(SQLSetQuantifier.UNIQUE);
|
||||
lexer.nextToken();
|
||||
} else if (lexer.token() == (Token.ALL)) {
|
||||
queryBlock.setDistionOption(SQLSetQuantifier.ALL);
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
parseSelectList(queryBlock);
|
||||
@@ -172,7 +176,7 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
lexer.nextToken();
|
||||
|
||||
if (lexer.token() == (Token.ALL)) {
|
||||
union.setAll(true);
|
||||
union.setOperator(SQLUnionOperator.UNION_ALL);
|
||||
lexer.nextToken();
|
||||
}
|
||||
|
||||
@@ -183,12 +187,32 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
return queryRest(union);
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.INTERSECT)) {
|
||||
throw new ParserException("TODO");
|
||||
if (lexer.token() == Token.INTERSECT) {
|
||||
lexer.nextToken();
|
||||
|
||||
SQLUnionQuery union = new SQLUnionQuery();
|
||||
union.setLeft(selectQuery);
|
||||
|
||||
union.setOperator(SQLUnionOperator.INTERSECT);
|
||||
|
||||
SQLSelectQuery right = this.query();
|
||||
union.setRight(right);
|
||||
|
||||
return union;
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.MINUS)) {
|
||||
throw new ParserException("TODO");
|
||||
if (lexer.token() == Token.MINUS) {
|
||||
lexer.nextToken();
|
||||
|
||||
SQLUnionQuery union = new SQLUnionQuery();
|
||||
union.setLeft(selectQuery);
|
||||
|
||||
union.setOperator(SQLUnionOperator.MINUS);
|
||||
|
||||
SQLSelectQuery right = this.query();
|
||||
union.setRight(right);
|
||||
|
||||
return union;
|
||||
}
|
||||
|
||||
return selectQuery;
|
||||
@@ -233,11 +257,16 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
private void parseHierachical(OracleSelectQueryBlock queryBlock) {
|
||||
OracleSelectHierachicalQueryClause hierachical = null;
|
||||
|
||||
if (identifierEquals("CONNECT")) {
|
||||
if (lexer.token() == Token.CONNECT) {
|
||||
hierachical = new OracleSelectHierachicalQueryClause();
|
||||
lexer.nextToken();
|
||||
accept(Token.BY);
|
||||
|
||||
if (lexer.token() == Token.PRIOR) {
|
||||
lexer.nextToken();
|
||||
hierachical.setPrior(true);
|
||||
}
|
||||
|
||||
if (identifierEquals("NOCYCLE")) {
|
||||
hierachical.setNoCycle(true);
|
||||
}
|
||||
@@ -283,13 +312,16 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
if (lexer.token() == (Token.LPAREN)) {
|
||||
lexer.nextToken();
|
||||
OracleSelectSubqueryTableSource tableSource;
|
||||
if (lexer.token() == (Token.SELECT)) tableSource = new OracleSelectSubqueryTableSource(select());
|
||||
else {
|
||||
throw new ParserException("TODO");
|
||||
if (lexer.token() == Token.SELECT) {
|
||||
tableSource = new OracleSelectSubqueryTableSource(select());
|
||||
} else if (lexer.token() == (Token.LPAREN)) {
|
||||
tableSource = new OracleSelectSubqueryTableSource(select());
|
||||
} else {
|
||||
throw new ParserException("TODO :" + lexer.token());
|
||||
}
|
||||
accept(Token.RPAREN);
|
||||
|
||||
parsePivot(tableSource);
|
||||
parsePivot((OracleSelectTableSource) tableSource);
|
||||
|
||||
return parseTableSourceRest(tableSource);
|
||||
}
|
||||
@@ -442,7 +474,7 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
|
||||
OracleSelectJoin.JoinType joinType = null;
|
||||
|
||||
if (identifierEquals("LEFT")) {
|
||||
if (lexer.token() == Token.LEFT) {
|
||||
lexer.nextToken();
|
||||
if (identifierEquals("OUTER")) {
|
||||
lexer.nextToken();
|
||||
@@ -451,7 +483,7 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
joinType = OracleSelectJoin.JoinType.LEFT_OUTER_JOIN;
|
||||
}
|
||||
|
||||
if (identifierEquals("RIGHT")) {
|
||||
if (lexer.token() == Token.RIGHT) {
|
||||
lexer.nextToken();
|
||||
if (identifierEquals("OUTER")) {
|
||||
lexer.nextToken();
|
||||
@@ -475,7 +507,7 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
joinType = OracleSelectJoin.JoinType.INNER_JOIN;
|
||||
}
|
||||
|
||||
if (lexer.token() == (Token.JOIN)) {
|
||||
if (lexer.token() == Token.JOIN) {
|
||||
lexer.nextToken();
|
||||
joinType = OracleSelectJoin.JoinType.JOIN;
|
||||
}
|
||||
@@ -491,7 +523,7 @@ public class OracleSelectParser extends SQLSelectParser {
|
||||
join.setJoinType(joinType);
|
||||
join.setRight(parseTableSource());
|
||||
|
||||
if (identifierEquals("ON")) {
|
||||
if (lexer.token() == Token.ON) {
|
||||
lexer.nextToken();
|
||||
join.setCondition(this.createExprParser().expr());
|
||||
} else if (identifierEquals("USING")) {
|
||||
|
||||
Reference in New Issue
Block a user