提交 a6c94ddf authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Fix commit 4f34f37d

上级 a36a6634
......@@ -203,13 +203,13 @@ public class FunctionAlias extends SchemaObjectBase {
}
@Override
public String getSQL() {
public StringBuilder getSQL(StringBuilder builder) {
// TODO can remove this method once FUNCTIONS_IN_SCHEMA is enabled
if (database.getSettings().functionsInSchema ||
!getSchema().getName().equals(Constants.SCHEMA_MAIN)) {
return super.getSQL();
return super.getSQL(builder);
}
return Parser.quoteIdentifier(getName());
return Parser.quoteIdentifier(builder, getName());
}
@Override
......
......@@ -230,6 +230,11 @@ public class FunctionTable extends Table {
return function.getSQL();
}
@Override
public StringBuilder getSQL(StringBuilder builder) {
return builder.append(function.getSQL());
}
@Override
public long getRowCountApproximation() {
return rowCount;
......
......@@ -71,8 +71,7 @@ public class RangeTable extends Table {
}
@Override
public String getSQL() {
StringBuilder builder = new StringBuilder();
public StringBuilder getSQL(StringBuilder builder) {
builder.append(NAME).append('(');
min.getSQL(builder).append(", ");
max.getSQL(builder);
......@@ -80,7 +79,7 @@ public class RangeTable extends Table {
builder.append(", ");
step.getSQL(builder);
}
return builder.append(')').toString();
return builder.append(')');
}
@Override
......
......@@ -456,12 +456,12 @@ public class TableView extends Table {
}
@Override
public String getSQL() {
public StringBuilder getSQL(StringBuilder builder) {
if (isTemporary() && querySQL != null) {
StringBuilder builder = new StringBuilder(querySQL.length() + 16).append("(\n");
return StringUtils.indent(builder, querySQL, 4, true).append(')').toString();
builder.append("(\n");
return StringUtils.indent(builder, querySQL, 4, true).append(')');
}
return super.getSQL();
return super.getSQL(builder);
}
public String getQuery() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论