Class RemoveFile

Object
io.delta.kernel.internal.actions.RowBackedAction
io.delta.kernel.internal.actions.RemoveFile

public class RemoveFile extends RowBackedAction
Metadata about remove action in the Delta Log.
  • Field Details

    • FULL_SCHEMA

      public static final StructType FULL_SCHEMA
      Full schema of the remove action in the Delta Log.
  • Constructor Details

    • RemoveFile

      public RemoveFile(Row row)
      Constructs an RemoveFile action from the given 'RemoveFile' Row.
  • Method Details

    • getPath

      public String getPath()
    • getDeletionTimestamp

      public Optional<Long> getDeletionTimestamp()
    • getDataChange

      public boolean getDataChange()
    • getExtendedFileMetadata

      public Optional<Boolean> getExtendedFileMetadata()
    • getPartitionValues

      public Optional<MapValue> getPartitionValues()
    • getSize

      public Optional<Long> getSize()
    • getStatsJson

      public Optional<String> getStatsJson()
    • getNumRecords

      public Optional<Long> getNumRecords()
    • getStats

      public Optional<DataFileStatistics> getStats(StructType physicalSchema)
      Returns the file statistics parsed from the stats JSON string using the provided schema. This method deserializes the statistics JSON with full type information, ensuring that min/max values and null counts are correctly typed according to the physical schema.
      Parameters:
      physicalSchema - the physical schema of the table, used to correctly parse and type the statistics values (min/max values and null counts)
      Returns:
      an Optional containing the deserialized DataFileStatistics if the stats field is present and non-null, or Optional.empty() otherwise
      Throws:
      KernelException - if the stats JSON is malformed or if values don't match the expected types from the schema
      See Also:
    • getTags

      public Optional<MapValue> getTags()
    • getDeletionVector

      public Optional<DeletionVectorDescriptor> getDeletionVector()
    • getBaseRowId

      public Optional<Long> getBaseRowId()
    • getDefaultRowCommitVersion

      public Optional<Long> getDefaultRowCommitVersion()
    • toString

      public String toString()
      Overrides:
      toString in class Object