hydra.langs.parquet.format.ColumnChunk Maven / Gradle / Ivy
package hydra.langs.parquet.format;
import java.io.Serializable;
public class ColumnChunk implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/parquet/format.ColumnChunk");
/**
* File where column data is stored. If not set, assumed to be same file as metadata. This path is relative to the current file.
*/
public final java.util.Optional filePath;
/**
* Byte offset in file_path to the ColumnMetaData
*/
public final Long fileOffset;
/**
* Column metadata for this chunk. This is the same content as what is at file_path/file_offset. Having it here has it replicated in the file metadata.
*/
public final java.util.Optional metaData;
/**
* File offset of ColumnChunk's OffsetIndex
*/
public final java.util.Optional offsetIndexOffset;
/**
* Size of ColumnChunk's OffsetIndex, in bytes
*/
public final java.util.Optional offsetIndexLength;
/**
* File offset of ColumnChunk's ColumnIndex
*/
public final java.util.Optional columnIndexOffset;
/**
* Size of ColumnChunk's ColumnIndex, in bytes
*/
public final java.util.Optional columnIndexLength;
/**
* Crypto metadata of encrypted columns
*/
public final java.util.Optional cryptoMetadata;
public final java.util.Optional encryptedColumnMetadata;
public ColumnChunk (java.util.Optional filePath, Long fileOffset, java.util.Optional metaData, java.util.Optional offsetIndexOffset, java.util.Optional offsetIndexLength, java.util.Optional columnIndexOffset, java.util.Optional columnIndexLength, java.util.Optional cryptoMetadata, java.util.Optional encryptedColumnMetadata) {
this.filePath = filePath;
this.fileOffset = fileOffset;
this.metaData = metaData;
this.offsetIndexOffset = offsetIndexOffset;
this.offsetIndexLength = offsetIndexLength;
this.columnIndexOffset = columnIndexOffset;
this.columnIndexLength = columnIndexLength;
this.cryptoMetadata = cryptoMetadata;
this.encryptedColumnMetadata = encryptedColumnMetadata;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof ColumnChunk)) {
return false;
}
ColumnChunk o = (ColumnChunk) (other);
return filePath.equals(o.filePath) && fileOffset.equals(o.fileOffset) && metaData.equals(o.metaData) && offsetIndexOffset.equals(o.offsetIndexOffset) && offsetIndexLength.equals(o.offsetIndexLength) && columnIndexOffset.equals(o.columnIndexOffset) && columnIndexLength.equals(o.columnIndexLength) && cryptoMetadata.equals(o.cryptoMetadata) && encryptedColumnMetadata.equals(o.encryptedColumnMetadata);
}
@Override
public int hashCode() {
return 2 * filePath.hashCode() + 3 * fileOffset.hashCode() + 5 * metaData.hashCode() + 7 * offsetIndexOffset.hashCode() + 11 * offsetIndexLength.hashCode() + 13 * columnIndexOffset.hashCode() + 17 * columnIndexLength.hashCode() + 19 * cryptoMetadata.hashCode() + 23 * encryptedColumnMetadata.hashCode();
}
public ColumnChunk withFilePath(java.util.Optional filePath) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withFileOffset(Long fileOffset) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withMetaData(java.util.Optional metaData) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withOffsetIndexOffset(java.util.Optional offsetIndexOffset) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withOffsetIndexLength(java.util.Optional offsetIndexLength) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withColumnIndexOffset(java.util.Optional columnIndexOffset) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withColumnIndexLength(java.util.Optional columnIndexLength) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withCryptoMetadata(java.util.Optional cryptoMetadata) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
public ColumnChunk withEncryptedColumnMetadata(java.util.Optional encryptedColumnMetadata) {
return new ColumnChunk(filePath, fileOffset, metaData, offsetIndexOffset, offsetIndexLength, columnIndexOffset, columnIndexLength, cryptoMetadata, encryptedColumnMetadata);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy