@Override public Set<String> getDimAttributeNames() { Set<String> dimNames = new HashSet<>(); for (CubeDimAttribute f : getDimAttributes()) { MetastoreUtil.addColumnNames(f, dimNames); } return dimNames; }
@Override public Set<String> getDimAttributeNames() { Set<String> dimNames = new HashSet<>(); for (CubeDimAttribute f : getDimAttributes()) { MetastoreUtil.addColumnNames(f, dimNames); } return dimNames; }
public Set<CubeColumn> getAllFields() { Set<CubeColumn> columns = Sets.newHashSet(); columns.addAll(getMeasures()); columns.addAll(getDimAttributes()); columns.addAll(getExpressions()); return columns; }
public Set<CubeColumn> getAllFields() { Set<CubeColumn> columns = Sets.newHashSet(); columns.addAll(getMeasures()); columns.addAll(getDimAttributes()); columns.addAll(getExpressions()); return columns; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } Cube other = (Cube) obj; if (this.getMeasures() == null) { if (other.getMeasures() != null) { return false; } } else if (!this.getMeasures().equals(other.getMeasures())) { return false; } if (this.getDimAttributes() == null) { if (other.getDimAttributes() != null) { return false; } } else if (!this.getDimAttributes().equals(other.getDimAttributes())) { return false; } return true; }
@Override public boolean equals(Object obj) { if (!super.equals(obj)) { return false; } Cube other = (Cube) obj; if (this.getMeasures() == null) { if (other.getMeasures() != null) { return false; } } else if (!this.getMeasures().equals(other.getMeasures())) { return false; } if (this.getDimAttributes() == null) { if (other.getDimAttributes() != null) { return false; } } else if (!this.getDimAttributes().equals(other.getDimAttributes())) { return false; } return true; }
assertEquals(cubeExpressions.size(), cube2.getExpressions().size()); assertEquals(cubeExpressions.size(), cube2.getExpressionNames().size()); assertEquals(moreCubeDimensions.size(), cube2.getDimAttributes().size()); assertEquals(moreCubeDimensions.size() + 8 + moreCubeMeasures.size() + cubeExpressions.size(), cube2 .getAllFieldNames().size());
assertEquals(cubeExpressions.size(), cube2.getExpressions().size()); assertEquals(cubeExpressions.size(), cube2.getExpressionNames().size()); assertEquals(cubeDimensions.size(), cube2.getDimAttributes().size()); assertEquals(cubeDimensions.size() + 8 + cubeMeasures.size() + cubeExpressions.size(), cube2 .getAllFieldNames().size()); assertEquals(cubeDimensions.size() + 8, cube2.getDimAttributeNames().size()); assertEquals(cubeMeasures.size(), cube2.getMeasures().size()); assertEquals(cubeDimensions.size(), cube2.getDimAttributes().size()); assertNotNull(cube2.getMeasureByName("msr4")); assertNotNull(cube2.getDimAttributeByName("location"));