Skip to content

Commit

Permalink
fix: De-parse TableFunction
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
Signed-off-by: manticore-projects <andreas@manticore-projects.com>
  • Loading branch information
manticore-projects committed Dec 8, 2024
1 parent 469190d commit e122bcf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,11 @@ public <S> StringBuilder visit(Function function, S context) {
} else if (function.isUnique()) {
buffer.append("UNIQUE ");
}

if (function.getExtraKeyword() != null) {
buffer.append(function.getExtraKeyword()).append(" ");
}

if (function.getNamedParameters() != null) {
function.getNamedParameters().accept(this, context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,14 @@ public <S> StringBuilder visit(TableStatement tableStatement, S context) {

@Override
public <S> StringBuilder visit(TableFunction tableFunction, S context) {
buffer.append(tableFunction.toString());
if (tableFunction.getPrefix() != null) {
buffer.append(tableFunction.getPrefix()).append(" ");
}
tableFunction.getFunction().accept(this.expressionVisitor, context);

if (tableFunction.getAlias() != null) {
buffer.append(tableFunction.getAlias());
}
return buffer;
}

Expand Down

0 comments on commit e122bcf

Please sign in to comment.