提交 aced9a02 authored 作者: Thomas Mueller's avatar Thomas Mueller

Make old-style outer joins optional

上级 41194e1c
...@@ -2153,7 +2153,8 @@ public class Parser { ...@@ -2153,7 +2153,8 @@ public class Parser {
read(")"); read(")");
} else { } else {
Expression right = readConcat(); Expression right = readConcat();
if (SysProperties.OLD_STYLE_OUTER_JOIN && readIf("(") && readIf("+") && readIf(")")) { if (SysProperties.OLD_STYLE_OUTER_JOIN &&
readIf("(") && readIf("+") && readIf(")")) {
// support for a subset of old-fashioned Oracle outer // support for a subset of old-fashioned Oracle outer
// join with (+) // join with (+)
if (r instanceof ExpressionColumn && if (r instanceof ExpressionColumn &&
...@@ -2577,12 +2578,12 @@ public class Parser { ...@@ -2577,12 +2578,12 @@ public class Parser {
} }
String name = readColumnIdentifier(); String name = readColumnIdentifier();
Schema s = database.findSchema(objectName); Schema s = database.findSchema(objectName);
if ((SysProperties.OLD_STYLE_OUTER_JOIN && s != null) && readIf("(")) { if ((!SysProperties.OLD_STYLE_OUTER_JOIN || s != null) && readIf("(")) {
// only if the token before the dot is a valid schema name, // only if the token before the dot is a valid schema name,
// otherwise the old style Oracle outer join doesn't work: // otherwise the old style Oracle outer join doesn't work:
// t.x = t2.x(+) // t.x = t2.x(+)
// this additional check is not required if the old style outer joins // this additional check is not required
// are not supported // if the old style outer joins are not supported
return readFunction(s, name); return readFunction(s, name);
} else if (readIf(".")) { } else if (readIf(".")) {
String schema = objectName; String schema = objectName;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论