@Override public void addProperties(Map<String, String> props) { super.addProperties(props); props.put(MetastoreUtil.getDimTypePropertyKey(getName()), type); if (numOfDistinctValues.isPresent()) { props.put(MetastoreUtil.getDimNumOfDistinctValuesPropertyKey(getName()), String.valueOf(numOfDistinctValues.get())); } if (values.isPresent() && !this.values.get().isEmpty()) { props.put(MetastoreUtil.getInlineDimensionValuesKey(getName()), MetastoreUtil.getStr(values.get())); } }
@Override public void addProperties(Map<String, String> props) { super.addProperties(props); props.put(MetastoreUtil.getDimTypePropertyKey(getName()), type); if (numOfDistinctValues.isPresent()) { props.put(MetastoreUtil.getDimNumOfDistinctValuesPropertyKey(getName()), String.valueOf(numOfDistinctValues.get())); } if (values.isPresent() && !this.values.get().isEmpty()) { props.put(MetastoreUtil.getInlineDimensionValuesKey(getName()), MetastoreUtil.getStr(values.get())); } }
assertEquals(col4.getDescription(), "hierarchical column"); BaseDimAttribute col4h1 = (BaseDimAttribute) col4.getHierarchy().get(0); assertEquals(col4h1.getName(), "col4-h1"); assertEquals(col4h1.getType(), "string"); assertEquals(col4h1.getDescription(), "inline column"); assertEquals(col4h1.getNumOfDistinctValues().get(), (Long) 3L); BaseDimAttribute col4h2 = (BaseDimAttribute) col4.getHierarchy().get(1); assertEquals(col4h2.getName(), "col4-h2"); assertEquals(col4h2.getType(), "string"); assertEquals(col4h2.getDescription(), "base column");
new BaseDimAttribute(new FieldSchema(col.getName(), "string", "invalid col"), col.getDisplayString(), oneWeekBack, null, col.getCost(), null); cube.alterDimension(newDim2);