Java Code Examples for org.pentaho.aggdes.model.Aggregate#getAttributes()
The following examples show how to use
org.pentaho.aggdes.model.Aggregate#getAttributes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResultImpl.java From pentaho-aggdesigner with GNU General Public License v2.0 | 6 votes |
public void describe(PrintWriter pw) { int j = -1; for (Aggregate aggregate : getAggregates()) { ++j; pw.print("AggregateTable: "); int i = 0; for (Attribute attribute : aggregate.getAttributes()) { if (i++ > 0) { pw.print(", "); } pw.print(attribute.getLabel()); } pw.println("; "); costBenefitList.get(j).describe(pw); pw.println(); } pw.println("Cost limit: " + costLimit); pw.println("Actual cost: " + cost); pw.println("Benefit: " + benefit); pw.println("Cost/benefit ratio: " + cost / benefit); }
Example 2
Source File: TileSuggester.java From Bats with Apache License 2.0 | 5 votes |
private Lattice.Tile toTile(Aggregate aggregate) { final Lattice.TileBuilder tileBuilder = new Lattice.TileBuilder(); for (Lattice.Measure measure : lattice.defaultMeasures) { tileBuilder.addMeasure(measure); } for (Attribute attribute : aggregate.getAttributes()) { tileBuilder.addDimension(((AttributeImpl) attribute).column); } return tileBuilder.build(); }
Example 3
Source File: TileSuggester.java From Quicksql with MIT License | 5 votes |
private Lattice.Tile toTile(Aggregate aggregate) { final Lattice.TileBuilder tileBuilder = new Lattice.TileBuilder(); for (Lattice.Measure measure : lattice.defaultMeasures) { tileBuilder.addMeasure(measure); } for (Attribute attribute : aggregate.getAttributes()) { tileBuilder.addDimension(((AttributeImpl) attribute).column); } return tileBuilder.build(); }
Example 4
Source File: TileSuggester.java From calcite with Apache License 2.0 | 5 votes |
private Lattice.Tile toTile(Aggregate aggregate) { final Lattice.TileBuilder tileBuilder = new Lattice.TileBuilder(); for (Lattice.Measure measure : lattice.defaultMeasures) { tileBuilder.addMeasure(measure); } for (Attribute attribute : aggregate.getAttributes()) { tileBuilder.addDimension(((AttributeImpl) attribute).column); } return tileBuilder.build(); }
Example 5
Source File: MondrianSchema.java From pentaho-aggdesigner with GNU General Public License v2.0 | 5 votes |
public String generateAggregateSql(Aggregate aggregate, List<String> columnNameList) { List<RolapStar.Column> list = new ArrayList<RolapStar.Column>(); for (Attribute attribute : aggregate.getAttributes()) { list.add(((MondrianAttribute) attribute).getRolapStarColumn()); } for (Measure measure : aggregate.getMeasures()) { list.add(((MondrianMeasure) measure).getRolapStarMeasure()); } return cube.getStar().generateSql(list, columnNameList); }