public XExprColumn withExprSpec(Collection<XExprSpec> values) { if (values!= null) { getExprSpec().addAll(values); } return this; }
public XExprColumn withExprSpec(XExprSpec... values) { if (values!= null) { for (XExprSpec value: values) { getExprSpec().add(value); } } return this; }
public XExprColumn withExprSpec(Collection<XExprSpec> values) { if (values!= null) { getExprSpec().addAll(values); } return this; }
public XExprColumn withExprSpec(XExprSpec... values) { if (values!= null) { for (XExprSpec value: values) { getExprSpec().add(value); } } return this; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { List<XExprSpec> theExprSpec; theExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); strategy.appendField(locator, this, "exprSpec", buffer, theExprSpec); } { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } return buffer; }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { List<XExprSpec> theExprSpec; theExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); strategy.appendField(locator, this, "exprSpec", buffer, theExprSpec); } { String theType; theType = this.getType(); strategy.appendField(locator, this, "type", buffer, theType); } return buffer; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List<XExprSpec> theExprSpec; theExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exprSpec", theExprSpec), currentHashCode, theExprSpec); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } return currentHashCode; }
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = super.hashCode(locator, strategy); { List<XExprSpec> theExprSpec; theExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "exprSpec", theExprSpec), currentHashCode, theExprSpec); } { String theType; theType = this.getType(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "type", theType), currentHashCode, theType); } return currentHashCode; }
lhsExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); List<XExprSpec> rhsExprSpec; rhsExprSpec = (((that.exprSpec!= null)&&(!that.exprSpec.isEmpty()))?that.getExprSpec():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "exprSpec", lhsExprSpec), LocatorUtils.property(thatLocator, "exprSpec", rhsExprSpec), lhsExprSpec, rhsExprSpec)) { return false;
lhsExprSpec = (((this.exprSpec!= null)&&(!this.exprSpec.isEmpty()))?this.getExprSpec():null); List<XExprSpec> rhsExprSpec; rhsExprSpec = (((that.exprSpec!= null)&&(!that.exprSpec.isEmpty()))?that.getExprSpec():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "exprSpec", lhsExprSpec), LocatorUtils.property(thatLocator, "exprSpec", rhsExprSpec), lhsExprSpec, rhsExprSpec)) { return false;
public static ExprColumn hiveExprColumnFromXExprColumn(XExprColumn xe) throws LensException { ExprColumn ec = new ExprColumn(new FieldSchema(xe.getName(), xe.getType().toLowerCase(), xe.getDescription()), xe.getDisplayString(), mapFromXProperties(xe.getTags()), exprSpecFromXExprColumn(xe.getExprSpec())); return ec; }
public static ExprColumn hiveExprColumnFromXExprColumn(XExprColumn xe) throws LensException { ExprColumn ec = new ExprColumn(new FieldSchema(xe.getName(), xe.getType().toLowerCase(), xe.getDescription()), xe.getDisplayString(), mapFromXProperties(xe.getTags()), exprSpecFromXExprColumn(xe.getExprSpec())); return ec; }
/** * Create XExprColumn from hive ExprColum */ public static XExprColumn xExprColumnFromHiveExprColumn(ExprColumn ec) { if (ec == null) { return null; } XExprColumn xe = XCF.createXExprColumn(); xe.setName(ec.getName()); xe.setType(ec.getType()); xe.setDescription(ec.getDescription()); xe.setDisplayString(ec.getDisplayString()); xe.getExprSpec().addAll(xExprSpecFromExprColumn(ec.getExpressionSpecs())); xe.setTags(getXProperties(xPropertiesFromMap(ec.getTags()))); return xe; }
/** * Create XExprColumn from hive ExprColum */ public static XExprColumn xExprColumnFromHiveExprColumn(ExprColumn ec) { if (ec == null) { return null; } XExprColumn xe = XCF.createXExprColumn(); xe.setName(ec.getName()); xe.setType(ec.getType()); xe.setDescription(ec.getDescription()); xe.setDisplayString(ec.getDisplayString()); xe.getExprSpec().addAll(xExprSpecFromExprColumn(ec.getExpressionSpecs())); xe.setTags(getXProperties(xPropertiesFromMap(ec.getTags()))); return xe; }
XExprSpec es = new XExprSpec(); es.setExpr("substr(col1, 3)"); xe1.getExprSpec().add(es); dimension.getExpressions().getExpression().add(xe1);
XExprSpec es = new XExprSpec(); es.setExpr("msr1/1000"); xe1.getExprSpec().add(es); XExprSpec es1 = new XExprSpec(); es1.setExpr("msr1/1000"); xe2.getExprSpec().add(es1); XExprSpec es2 = new XExprSpec(); es2.setExpr("(msr1/1000) + 0.01"); es2.setStartTime(startDate); xe2.getExprSpec().add(es2); XExprSpec es3 = new XExprSpec(); es3.setExpr("(msr1/1000) + 0.03"); es3.setEndTime(endDate); xe2.getExprSpec().add(es3); XExprSpec es4 = new XExprSpec(); es4.setExpr("(msr1/1000) - 0.01"); es4.setStartTime(startDate); es4.setEndTime(endDate); xe2.getExprSpec().add(es4);