@Test public void testToString() { DataSchema dataSchema = new DataSchema(COLUMN_NAMES, COLUMN_DATA_TYPES); Assert.assertEquals(dataSchema.toString(), "[int(INT),long(LONG),float(FLOAT),double(DOUBLE),string(STRING),object(OBJECT),int_array(INT_ARRAY),long_array(LONG_ARRAY),float_array(FLOAT_ARRAY),double_array(DOUBLE_ARRAY),string_array(STRING_ARRAY)]"); }
@Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); int numColumns = _columnNames.length; for (int i = 0; i < numColumns; i++) { stringBuilder.append(_columnNames[i]).append('(').append(_columnDataTypes[i]).append(')').append(','); } stringBuilder.setCharAt(stringBuilder.length() - 1, ']'); return stringBuilder.toString(); }
DataSchema { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); int numColumns = _columnNames.length; for (int i = 0; i < numColumns; i++) { stringBuilder.append(_columnNames[i]).append('(').append(_columnDataTypes[i]).append(')').append(','); } stringBuilder.setCharAt(stringBuilder.length() - 1, ']'); return stringBuilder.toString(); } }
DataSchema { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); int numColumns = _columnNames.length; for (int i = 0; i < numColumns; i++) { stringBuilder.append(_columnNames[i]).append('(').append(_columnDataTypes[i]).append(')').append(','); } stringBuilder.setCharAt(stringBuilder.length() - 1, ']'); return stringBuilder.toString(); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); }
DataSchema { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); int numColumns = _columnNames.length; for (int i = 0; i < numColumns; i++) { stringBuilder.append(_columnNames[i]).append('(').append(_columnDataTypes[i]).append(')').append(','); } stringBuilder.setCharAt(stringBuilder.length() - 1, ']'); return stringBuilder.toString(); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); int size(); String getColumnName(int index); String[] getColumnNames(); ColumnDataType getColumnDataType(int index); ColumnDataType[] getColumnDataTypes(); boolean isTypeCompatibleWith(DataSchema anotherDataSchema); void upgradeToCover(DataSchema anotherDataSchema); byte[] toBytes(); static DataSchema fromBytes(byte[] buffer); @SuppressWarnings("CloneDoesntCallSuperClone") @Override DataSchema clone(); @Override String toString(); @Override boolean equals(Object anObject); @Override int hashCode(); }
DataSchema { @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append('['); int numColumns = _columnNames.length; for (int i = 0; i < numColumns; i++) { stringBuilder.append(_columnNames[i]).append('(').append(_columnDataTypes[i]).append(')').append(','); } stringBuilder.setCharAt(stringBuilder.length() - 1, ']'); return stringBuilder.toString(); } DataSchema(String[] columnNames, ColumnDataType[] columnDataTypes); int size(); String getColumnName(int index); String[] getColumnNames(); ColumnDataType getColumnDataType(int index); ColumnDataType[] getColumnDataTypes(); boolean isTypeCompatibleWith(DataSchema anotherDataSchema); void upgradeToCover(DataSchema anotherDataSchema); byte[] toBytes(); static DataSchema fromBytes(byte[] buffer); @SuppressWarnings("CloneDoesntCallSuperClone") @Override DataSchema clone(); @Override String toString(); @Override boolean equals(Object anObject); @Override int hashCode();  }