diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java index 705db155c..93680dd74 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java @@ -180,7 +180,7 @@ public StringBuilder visit(PlainSelect plainSelect, S context) { buffer.append(first).append(" "); } - deparseDistinctClause(plainSelect.getDistinct()); + deparseDistinctClause(plainSelect, plainSelect.getDistinct()); if (plainSelect.getBigQuerySelectQualifier() != null) { switch (plainSelect.getBigQuerySelectQualifier()) { @@ -206,7 +206,7 @@ public StringBuilder visit(PlainSelect plainSelect, S context) { buffer.append("SQL_CALC_FOUND_ROWS").append(" "); } - deparseSelectItemsClause(plainSelect.getSelectItems()); + deparseSelectItemsClause(plainSelect, plainSelect.getSelectItems()); if (plainSelect.getIntoTables() != null) { buffer.append(" INTO "); @@ -340,7 +340,8 @@ protected void deparseWhereClause(PlainSelect plainSelect) { } } - protected void deparseDistinctClause(Distinct distinct) { + protected void deparseDistinctClause(PlainSelect plainSelect, + Distinct distinct) { if (distinct != null) { if (distinct.isUseUnique()) { buffer.append("UNIQUE "); @@ -362,7 +363,8 @@ protected void deparseDistinctClause(Distinct distinct) { } } - protected void deparseSelectItemsClause(List> selectItems) { + protected void deparseSelectItemsClause(PlainSelect plainSelect, + List> selectItems) { if (selectItems != null) { for (Iterator> iter = selectItems.iterator(); iter.hasNext();) { SelectItem selectItem = iter.next();