public java.lang.Object getFieldValue(_Fields field) { switch (field) { case COLUMNS: return getColumns(); case TOTAL_BYTE_SIZE: return getTotal_byte_size(); case NUM_ROWS: return getNum_rows(); case SORTING_COLUMNS: return getSorting_columns(); } throw new java.lang.IllegalStateException(); }
public RowGroup deepCopy() { return new RowGroup(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof RowGroup) return this.equals((RowGroup)that); return false; }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case COLUMNS: return isSetColumns(); case TOTAL_BYTE_SIZE: return isSetTotal_byte_size(); case NUM_ROWS: return isSetNum_rows(); case SORTING_COLUMNS: return isSetSorting_columns(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287); if (isSetColumns()) hashCode = hashCode * 8191 + columns.hashCode(); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(total_byte_size); hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(num_rows); hashCode = hashCode * 8191 + ((isSetSorting_columns()) ? 131071 : 524287); if (isSetSorting_columns()) hashCode = hashCode * 8191 + sorting_columns.hashCode(); return hashCode; }
for (RowGroup rowGroup : rowGroups) { BlockMetaData blockMetaData = new BlockMetaData(); blockMetaData.setRowCount(rowGroup.getNum_rows()); blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size()); List<ColumnChunk> columns = rowGroup.getColumns(); validateParquet(!columns.isEmpty(), "No columns in row group: %s", rowGroup); String filePath = columns.get(0).getFile_path();
struct.setColumnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.total_byte_size = iprot.readI64(); struct.setTotal_byte_sizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_rows = iprot.readI64(); struct.setNum_rowsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setSorting_columnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetTotal_byte_size()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_byte_size' was not found in serialized data! Struct: " + toString()); if (!struct.isSetNum_rows()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_rows' was not found in serialized data! Struct: " + toString()); struct.validate();
static long getOffset(RowGroup rowGroup) { return getOffset(rowGroup.getColumns().get(0)); } // Visible for testing
public void write(org.apache.thrift.protocol.TProtocol oprot, RowGroup struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeFieldEnd(); if (struct.sorting_columns != null) { if (struct.isSetSorting_columns()) { oprot.writeFieldBegin(SORTING_COLUMNS_FIELD_DESC);
sb.append(this.num_rows); first = false; if (isSetSorting_columns()) { if (!first) sb.append(", "); sb.append("sorting_columns:");
for (RowGroup rowGroup : rowGroups) { BlockMetaData blockMetaData = new BlockMetaData(); blockMetaData.setRowCount(rowGroup.getNum_rows()); blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size()); List<ColumnChunk> columns = rowGroup.getColumns(); validateParquet(!columns.isEmpty(), "No columns in row group: %s", rowGroup); String filePath = columns.get(0).getFile_path();
struct.setColumnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.total_byte_size = iprot.readI64(); struct.setTotal_byte_sizeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.num_rows = iprot.readI64(); struct.setNum_rowsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setSorting_columnsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetTotal_byte_size()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'total_byte_size' was not found in serialized data! Struct: " + toString()); if (!struct.isSetNum_rows()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'num_rows' was not found in serialized data! Struct: " + toString()); struct.validate();
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case COLUMNS: return isSetColumns(); case TOTAL_BYTE_SIZE: return isSetTotal_byte_size(); case NUM_ROWS: return isSetNum_rows(); case SORTING_COLUMNS: return isSetSorting_columns(); } throw new IllegalStateException(); }
static long getOffset(RowGroup rowGroup) { return getOffset(rowGroup.getColumns().get(0)); } // Visible for testing
return false; boolean this_present_columns = true && this.isSetColumns(); boolean that_present_columns = true && that.isSetColumns(); if (this_present_columns || that_present_columns) { if (!(this_present_columns && that_present_columns)) boolean this_present_sorting_columns = true && this.isSetSorting_columns(); boolean that_present_sorting_columns = true && that.isSetSorting_columns(); if (this_present_sorting_columns || that_present_sorting_columns) { if (!(this_present_sorting_columns && that_present_sorting_columns))
public void write(org.apache.thrift.protocol.TProtocol oprot, RowGroup struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeFieldEnd(); if (struct.sorting_columns != null) { if (struct.isSetSorting_columns()) { oprot.writeFieldBegin(SORTING_COLUMNS_FIELD_DESC);
sb.append(this.num_rows); first = false; if (isSetSorting_columns()) { if (!first) sb.append(", "); sb.append("sorting_columns:");
for (RowGroup rowGroup : row_groups) { BlockMetaData blockMetaData = new BlockMetaData(); blockMetaData.setRowCount(rowGroup.getNum_rows()); blockMetaData.setTotalByteSize(rowGroup.getTotal_byte_size()); List<ColumnChunk> columns = rowGroup.getColumns(); String filePath = columns.get(0).getFile_path(); for (ColumnChunk columnChunk : columns) {