forked from pentaho/mondrian
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MONDRIAN-1272] - Native Top Count cannot handle empty members
- TODO - describe
- Loading branch information
Andrey Khayrutdinov
committed
Sep 8, 2015
1 parent
3963fb3
commit 2436bfb
Showing
15 changed files
with
814 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mondrian.rolap.sql.query; | ||
|
||
/** | ||
* @author Andrey Khayrutdinov | ||
*/ | ||
// todo Khayrutdinov: docs | ||
class AliasGenerator { | ||
private final StringBuilder sb; | ||
private final int seedLength; | ||
private int counter; | ||
|
||
AliasGenerator(String seed) { | ||
this.seedLength = seed.length(); | ||
this.counter = 0; | ||
|
||
sb = new StringBuilder(seedLength + 2); | ||
sb.append(seed); | ||
} | ||
|
||
String nextAlias() { | ||
sb.setLength(seedLength); | ||
return sb.append(counter++).toString(); | ||
} | ||
} |
Oops, something went wrong.