public static Dimension dimensionFromXDimension(XDimension dimension) throws LensException { Set<CubeDimAttribute> dims = new LinkedHashSet<CubeDimAttribute>(); for (XDimAttribute xd : dimension.getAttributes().getDimAttribute()) { dims.add(hiveDimAttrFromXDimAttr(xd)); } Set<ExprColumn> expressions = new LinkedHashSet<ExprColumn>(); if (dimension.getExpressions() != null && !dimension.getExpressions().getExpression().isEmpty()) { for (XExprColumn xe : dimension.getExpressions().getExpression()) { expressions.add(hiveExprColumnFromXExprColumn(xe)); } } Set<JoinChain> joinchains = new LinkedHashSet<JoinChain>(); if (dimension.getJoinChains() != null && !dimension.getJoinChains().getJoinChain().isEmpty()) { for (XJoinChain xj : dimension.getJoinChains().getJoinChain()) { joinchains.add(joinChainFromXJoinChain(xj)); } } Map<String, String> properties = mapFromXProperties(dimension.getProperties()); return new Dimension(dimension.getName(), dims, expressions, joinchains, properties, 0L); }
public static Dimension dimensionFromXDimension(XDimension dimension) throws LensException { Set<CubeDimAttribute> dims = new LinkedHashSet<CubeDimAttribute>(); for (XDimAttribute xd : dimension.getAttributes().getDimAttribute()) { dims.add(hiveDimAttrFromXDimAttr(xd)); } Set<ExprColumn> expressions = new LinkedHashSet<ExprColumn>(); if (dimension.getExpressions() != null && !dimension.getExpressions().getExpression().isEmpty()) { for (XExprColumn xe : dimension.getExpressions().getExpression()) { expressions.add(hiveExprColumnFromXExprColumn(xe)); } } Set<JoinChain> joinchains = new LinkedHashSet<JoinChain>(); if (dimension.getJoinChains() != null && !dimension.getJoinChains().getJoinChain().isEmpty()) { for (XJoinChain xj : dimension.getJoinChains().getJoinChain()) { joinchains.add(joinChainFromXJoinChain(xj)); } } Map<String, String> properties = mapFromXProperties(dimension.getProperties()); return new Dimension(dimension.getName(), dims, expressions, joinchains, properties, 0L); }
public static XDimension xdimensionFromDimension(Dimension dimension) { XDimension xd = XCF.createXDimension(); xd.setName(dimension.getName()); xd.setAttributes(new XDimAttributes()); xd.setExpressions(new XExpressions()); xd.setJoinChains(new XJoinChains()); xd.setProperties(new XProperties()); xd.getProperties().getProperty().addAll(xPropertiesFromMap(((AbstractCubeTable) dimension).getProperties())); for (CubeDimAttribute cd : dimension.getAttributes()) { xd.getAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, dimension)); } for (ExprColumn ec : dimension.getExpressions()) { xd.getExpressions().getExpression().add(xExprColumnFromHiveExprColumn(ec)); } for (JoinChain jc : dimension.getJoinChains()) { xd.getJoinChains().getJoinChain().add(getXJoinChainFromJoinChain(jc)); } return xd; }
public static XDimension xdimensionFromDimension(Dimension dimension) { XDimension xd = XCF.createXDimension(); xd.setName(dimension.getName()); xd.setAttributes(new XDimAttributes()); xd.setExpressions(new XExpressions()); xd.setJoinChains(new XJoinChains()); xd.setProperties(new XProperties()); xd.getProperties().getProperty().addAll(xPropertiesFromMap(((AbstractCubeTable) dimension).getProperties())); for (CubeDimAttribute cd : dimension.getAttributes()) { xd.getAttributes().getDimAttribute().add(xDimAttrFromHiveDimAttr(cd, dimension)); } for (ExprColumn ec : dimension.getExpressions()) { xd.getExpressions().getExpression().add(xExprColumnFromHiveExprColumn(ec)); } for (JoinChain jc : dimension.getJoinChains()) { xd.getJoinChains().getJoinChain().add(getXJoinChainFromJoinChain(jc)); } return xd; }
assertEquals(testDim.getAttributes().getDimAttribute().size(), 5); assertEquals(testDim.getExpressions().getExpression().size(), 1); assertEquals(testDim.getJoinChains().getJoinChain().size(), 1); assertEquals(testDim.getJoinChains().getJoinChain().get(0).getPaths().getPath().size(), 1); assertEquals( testDim.getJoinChains().getJoinChain().get(0).getPaths().getPath().get(0).getEdges().getEdge().size(), 1); assertEquals(testDim.getJoinChains().getJoinChain().get(0).getDescription(), "first chain"); assertEquals(testDim.getJoinChains().getJoinChain().get(0).getDisplayString(), "Chain-1");
theJoinChains = this.getJoinChains(); strategy.appendField(locator, this, "joinChains", buffer, theJoinChains);
theJoinChains = this.getJoinChains(); strategy.appendField(locator, this, "joinChains", buffer, theJoinChains);
path1.getEdges().getEdge().add(edge1); xj1.getPaths().getPath().add(path1); dimension.getJoinChains().getJoinChain().add(xj1); dimension.getAttributes().getDimAttribute().add(xd3); dimension.getAttributes().getDimAttribute().add(xd4);
lhsJoinChains = this.getJoinChains(); XJoinChains rhsJoinChains; rhsJoinChains = that.getJoinChains(); if (!strategy.equals(LocatorUtils.property(thisLocator, "joinChains", lhsJoinChains), LocatorUtils.property(thatLocator, "joinChains", rhsJoinChains), lhsJoinChains, rhsJoinChains)) { return false;
theJoinChains = this.getJoinChains(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "joinChains", theJoinChains), currentHashCode, theJoinChains);
theJoinChains = this.getJoinChains(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "joinChains", theJoinChains), currentHashCode, theJoinChains);
lhsJoinChains = this.getJoinChains(); XJoinChains rhsJoinChains; rhsJoinChains = that.getJoinChains(); if (!strategy.equals(LocatorUtils.property(thisLocator, "joinChains", lhsJoinChains), LocatorUtils.property(thatLocator, "joinChains", rhsJoinChains), lhsJoinChains, rhsJoinChains)) { return false;