Skip to content

Commit 469190d

Browse files
fix: Alias of the ParenthesedSelect when FromItem is a TableFunction
Signed-off-by: Andreas Reichel <[email protected]> Signed-off-by: manticore-projects <[email protected]>
1 parent e8ff9fb commit 469190d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/net/sf/jsqlparser/statement/select/ParenthesedSelect.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ private static Alias getAliasFromItem(FromItem fromItem) {
7575
if (fromItem instanceof Table && fromItem.getAlias() == null) {
7676
Table t = (Table) fromItem;
7777
return new Alias(t.getName(), true);
78+
} else if (fromItem instanceof TableFunction && fromItem.getAlias() == null) {
79+
TableFunction t = (TableFunction) fromItem;
80+
return new Alias(t.getName(), true);
7881
} else {
7982
return new Alias(fromItem.getAlias().getName(), true);
8083
}

0 commit comments

Comments
 (0)