Class LogReplay

Object
io.delta.kernel.internal.replay.LogReplay

public class LogReplay extends Object
Replays a history of actions, resolving them to produce the current state of the table. The protocol for resolution is as follows: - The most recent AddFile and accompanying metadata for any `(path, dv id)` tuple wins. - RemoveFile deletes a corresponding AddFile. A RemoveFile "corresponds" to the AddFile that matches both the parquet file URI *and* the deletion vector's URI (if any). - The most recent Metadata wins. - The most recent Protocol version wins. - For each `(path, dv id)` tuple, this class should always output only one FileAction (either AddFile or RemoveFile) This class exposes the following public APIs - getProtocol(): latest non-null Protocol - getMetadata(): latest non-null Metadata - getAddFilesAsColumnarBatches(io.delta.kernel.engine.Engine, boolean, java.util.Optional<io.delta.kernel.expressions.Predicate>): return all active (not tombstoned) AddFiles as ColumnarBatchs
  • Field Details

    • PROTOCOL_METADATA_READ_SCHEMA

      public static final StructType PROTOCOL_METADATA_READ_SCHEMA
      Read schema when searching for the latest Protocol and Metadata.
    • SET_TRANSACTION_READ_SCHEMA

      public static final StructType SET_TRANSACTION_READ_SCHEMA
      Read schema when searching for just the transaction identifiers
    • SIDECAR_FIELD_NAME

      public static String SIDECAR_FIELD_NAME
    • ADDFILE_FIELD_NAME

      public static String ADDFILE_FIELD_NAME
    • REMOVEFILE_FIELD_NAME

      public static String REMOVEFILE_FIELD_NAME
    • ADD_FILE_ORDINAL

      public static int ADD_FILE_ORDINAL
    • ADD_FILE_PATH_ORDINAL

      public static int ADD_FILE_PATH_ORDINAL
    • ADD_FILE_DV_ORDINAL

      public static int ADD_FILE_DV_ORDINAL
    • REMOVE_FILE_ORDINAL

      public static int REMOVE_FILE_ORDINAL
    • REMOVE_FILE_PATH_ORDINAL

      public static int REMOVE_FILE_PATH_ORDINAL
    • REMOVE_FILE_DV_ORDINAL

      public static int REMOVE_FILE_DV_ORDINAL
  • Constructor Details

  • Method Details