@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasColumnId()) { hash = (37 * hash) + COLUMNID_FIELD_NUMBER; hash = (53 * hash) + getColumnId(); } if (hasAscending()) { hash = (37 * hash) + ASCENDING_FIELD_NUMBER; hash = (53 * hash) + hashBoolean(getAscending()); } if (hasNullFirst()) { hash = (37 * hash) + NULLFIRST_FIELD_NUMBER; hash = (53 * hash) + hashBoolean(getNullFirst()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.tajo.catalog.proto.CatalogProtos.TupleComparatorSpecProto)) { return super.equals(obj); } org.apache.tajo.catalog.proto.CatalogProtos.TupleComparatorSpecProto other = (org.apache.tajo.catalog.proto.CatalogProtos.TupleComparatorSpecProto) obj; boolean result = true; result = result && (hasColumnId() == other.hasColumnId()); if (hasColumnId()) { result = result && (getColumnId() == other.getColumnId()); } result = result && (hasAscending() == other.hasAscending()); if (hasAscending()) { result = result && (getAscending() == other.getAscending()); } result = result && (hasNullFirst() == other.hasNullFirst()); if (hasNullFirst()) { result = result && (getNullFirst() == other.getNullFirst()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
public BaseTupleComparator(TupleComparatorProto proto) { this.schema = SchemaFactory.newV1(proto.getSchema()); this.sortSpecs = new SortSpec[proto.getSortSpecsCount()]; for (int i = 0; i < proto.getSortSpecsCount(); i++) { sortSpecs[i] = new SortSpec(proto.getSortSpecs(i)); } this.sortKeyIds = new int[proto.getCompSpecsCount()]; this.asc = new boolean[proto.getCompSpecsCount()]; this.nullFirsts = new boolean[proto.getCompSpecsCount()]; for (int i = 0; i < proto.getCompSpecsCount(); i++) { TupleComparatorSpecProto sortSepcProto = proto.getCompSpecs(i); sortKeyIds[i] = sortSepcProto.getColumnId(); asc[i] = sortSepcProto.getAscending(); nullFirsts[i] = sortSepcProto.getNullFirst(); } }
public BaseTupleComparator(TupleComparatorProto proto) { this.schema = new Schema(proto.getSchema()); this.sortSpecs = new SortSpec[proto.getSortSpecsCount()]; for (int i = 0; i < proto.getSortSpecsCount(); i++) { sortSpecs[i] = new SortSpec(proto.getSortSpecs(i)); } this.sortKeyIds = new int[proto.getCompSpecsCount()]; this.asc = new boolean[proto.getCompSpecsCount()]; this.nullFirsts = new boolean[proto.getCompSpecsCount()]; for (int i = 0; i < proto.getCompSpecsCount(); i++) { TupleComparatorSpecProto sortSepcProto = proto.getCompSpecs(i); sortKeyIds[i] = sortSepcProto.getColumnId(); asc[i] = sortSepcProto.getAscending(); nullFirsts[i] = sortSepcProto.getNullFirst(); } }
public Builder mergeFrom(org.apache.tajo.catalog.proto.CatalogProtos.TupleComparatorSpecProto other) { if (other == org.apache.tajo.catalog.proto.CatalogProtos.TupleComparatorSpecProto.getDefaultInstance()) return this; if (other.hasColumnId()) { setColumnId(other.getColumnId()); } if (other.hasAscending()) { setAscending(other.getAscending()); } if (other.hasNullFirst()) { setNullFirst(other.getNullFirst()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public TupleComparator(TupleComparatorProto proto) { this.sortKeyIds = new int[proto.getCompSpecsCount()]; this.asc = new boolean[proto.getCompSpecsCount()]; this.nullFirsts = new boolean[proto.getCompSpecsCount()]; for (int i = 0; i < proto.getCompSpecsCount(); i++) { TupleComparatorSpecProto sortSepcProto = proto.getCompSpecs(i); sortKeyIds[i] = sortSepcProto.getColumnId(); asc[i] = sortSepcProto.getAscending(); nullFirsts[i] = sortSepcProto.getNullFirst(); } }