Skip to content

Commit bf1892e

Browse files
author
David Hayes
committed
Resolving test failure, and modifying the SelectDeParser to add the withClause where present
1 parent 78dc700 commit bf1892e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,10 @@ public <S> StringBuilder visit(TableFunction tableFunction, S context) {
747747
}
748748
tableFunction.getFunction().accept(this.expressionVisitor, context);
749749

750+
if (tableFunction.getWithClause() != null) {
751+
builder.append(" ").append(tableFunction.getWithClause());
752+
}
753+
750754
if (tableFunction.getAlias() != null) {
751755
builder.append(tableFunction.getAlias());
752756
}

src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6643,7 +6643,7 @@ TableFunction TableFunction():
66436643
{
66446644
[ prefix = <K_LATERAL> ]
66456645
function=Function()
6646-
[ withClause = <K_WITH_OFFSET> | <K_WITH_ORDINALITY> ]
6646+
[ withClause = <K_WITH_OFFSET> | withClause = <K_WITH_ORDINALITY> ]
66476647
{
66486648
return prefix!=null
66496649
? withClause!=null

0 commit comments

Comments
 (0)