@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOffset()); hash = (37 * hash) + DONE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDone()); if (getRowsCount() > 0) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRowsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OFFSET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getOffset()); hash = (37 * hash) + DONE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getDone()); if (getRowsCount() > 0) { hash = (37 * hash) + ROWS_FIELD_NUMBER; hash = (53 * hash) + getRowsList().hashCode(); } hash = (29 * hash) + unknownFields.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.calcite.avatica.proto.Common.Frame)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Common.Frame other = (org.apache.calcite.avatica.proto.Common.Frame) obj; boolean result = true; result = result && (getOffset() == other.getOffset()); result = result && (getDone() == other.getDone()); result = result && getRowsList() .equals(other.getRowsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
assertEquals(frame.done, protoFrame.getDone());
assertEquals(frame.done, protoFrame.getDone());
assertEquals(frame.done, protoFrame.getDone());
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.calcite.avatica.proto.Common.Frame)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Common.Frame other = (org.apache.calcite.avatica.proto.Common.Frame) obj; boolean result = true; result = result && (getOffset() == other.getOffset()); result = result && (getDone() == other.getDone()); result = result && getRowsList() .equals(other.getRowsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
public static Frame fromProto(Common.Frame proto) { List<Object> parsedRows = new ArrayList<>(proto.getRowsCount()); for (Common.Row protoRow : proto.getRowsList()) { ArrayList<Object> row = new ArrayList<>(protoRow.getValueCount()); for (Common.ColumnValue protoColumn : protoRow.getValueList()) { final Object value; if (!isNewStyleColumn(protoColumn)) { // Backward compatibility value = parseOldStyleColumn(protoColumn); } else { // Current style parsing (separate scalar and array values) value = parseColumn(protoColumn); } row.add(value); } parsedRows.add(row); } return new Frame(proto.getOffset(), proto.getDone(), parsedRows); }
public static Frame fromProto(Common.Frame proto) { List<Object> parsedRows = new ArrayList<>(proto.getRowsCount()); for (Common.Row protoRow : proto.getRowsList()) { ArrayList<Object> row = new ArrayList<>(protoRow.getValueCount()); for (Common.ColumnValue protoColumn : protoRow.getValueList()) { final Object value; if (!isNewStyleColumn(protoColumn)) { // Backward compatibility value = parseOldStyleColumn(protoColumn); } else { // Current style parsing (separate scalar and array values) value = parseColumn(protoColumn); } row.add(value); } parsedRows.add(row); } return new Frame(proto.getOffset(), proto.getDone(), parsedRows); }
public static Frame fromProto(Common.Frame proto) { List<Object> parsedRows = new ArrayList<>(proto.getRowsCount()); for (Common.Row protoRow : proto.getRowsList()) { ArrayList<Object> row = new ArrayList<>(protoRow.getValueCount()); for (Common.ColumnValue protoColumn : protoRow.getValueList()) { final Object value; if (!isNewStyleColumn(protoColumn)) { // Backward compatibility value = parseOldStyleColumn(protoColumn); } else { // Current style parsing (separate scalar and array values) value = parseColumn(protoColumn); } row.add(value); } parsedRows.add(row); } return new Frame(proto.getOffset(), proto.getDone(), parsedRows); }