Skip to content

Commit

Permalink
corrected some styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpz committed Feb 10, 2014
1 parent 43d97ea commit a3a7ff9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/main/java/net/sf/jsqlparser/expression/WindowOffset.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public String toString() {
buffer.append(' ');
buffer.append(type);
}
buffer.append(' ');
} else {
switch (type) {
case PRECEDING:
Expand All @@ -70,14 +69,12 @@ public String toString() {
buffer.append(" UNBOUNDED FOLLOWING");
break;
case CURRENT:
buffer.append(" CURRENT ROW ");
buffer.append(" CURRENT ROW");
break;
default:
break;
}

}

return buffer.toString();
}
}
4 changes: 2 additions & 2 deletions src/test/java/net/sf/jsqlparser/test/select/SelectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1025,12 +1025,12 @@ public void testAnalyticFunction16() throws JSQLParserException {
}

public void testAnalyticFunction17() throws JSQLParserException {
String statement = "SELECT AVG(sal) OVER (PARTITION BY deptno ORDER BY sal ROWS BETWEEN 0 PRECEDING AND 0 PRECEDING ) AS avg_of_current_sal FROM emp";
String statement = "SELECT AVG(sal) OVER (PARTITION BY deptno ORDER BY sal ROWS BETWEEN 0 PRECEDING AND 0 PRECEDING) AS avg_of_current_sal FROM emp";
assertSqlCanBeParsedAndDeparsed(statement);
}

public void testAnalyticFunction18() throws JSQLParserException {
String statement = "SELECT AVG(sal) OVER (PARTITION BY deptno ORDER BY sal RANGE CURRENT ROW ) AS avg_of_current_sal FROM emp";
String statement = "SELECT AVG(sal) OVER (PARTITION BY deptno ORDER BY sal RANGE CURRENT ROW) AS avg_of_current_sal FROM emp";
assertSqlCanBeParsedAndDeparsed(statement);
}

Expand Down

0 comments on commit a3a7ff9

Please sign in to comment.