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

Some nested joins could not be executed, for example: select * from (select *…

Some nested joins could not be executed, for example: select * from (select * from (select * from a) a right join b b) c;
上级 f941b5df
......@@ -634,9 +634,15 @@ public class TableFilter implements ColumnResolver {
buffNested.append('\n');
n = n.getJoin();
} while (n != null);
buff.append("(\n");
buff.append(StringUtils.indent(buffNested.toString(), 4, false));
buff.append(')');
String nested = buffNested.toString();
boolean enclose = !nested.startsWith("(");
if (enclose) {
buff.append("(\n");
}
buff.append(StringUtils.indent(nested, 4, false));
if (enclose) {
buff.append(')');
}
if (isJoin) {
buff.append(" ON ");
if (joinCondition == null) {
......
select 1 from(select 2 from(select 1) a right join dual b) c;
> 1;
select 1.00 / 3 * 0.00;
> 0.00000000000000000000000000000;
select 1.00000 / 3 * 0.0000;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论