AddFile

AddFile is a file action to denote a file added to a delta table.

AddFile is created when:

Creating AddFile Instance

AddFile takes the following to be created:

  • Path

  • Partition values (Map[String, String])

  • Size (in bytes)

  • Modification time

  • dataChange flag

  • Stats (default: null)

  • Tags (Map[String, String]) (default: null)

wrap Method

wrap: SingleAction
wrap is part of the Action contract to wrap the action into a SingleAction for serialization.

wrap simply creates a new SingleAction with the add field set to this AddFile.

Creating RemoveFile Instance With Current Timestamp — remove Method

remove: RemoveFile

remove creates a RemoveFile action with the current timestamp and dataChange flag enabled.

remove is used when:

Creating RemoveFile Instance For Given Timestamp — removeWithTimestamp Method

removeWithTimestamp(
  timestamp: Long = System.currentTimeMillis(),
  dataChange: Boolean = true): RemoveFile

removeWithTimestamp creates a RemoveFile action for the path, and the given timestamp and dataChange flag.

removeWithTimestamp is used when: