Skip to content

AddFile

AddFile is a FileAction that represents an action of adding a file to a delta table.

Creating 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)

AddFile is created when:

Converting to SingleAction

wrap: SingleAction

wrap is part of the Action abstraction.

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

Converting to RemoveFile with Defaults

remove: RemoveFile

remove creates a RemoveFile for the path (with the current time and dataChange flag enabled).

remove is used when:

Converting to RemoveFile

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

remove creates a new RemoveFile action for the path with the given timestamp and dataChange flag.

removeWithTimestamp is used when:


Last update: 2021-05-28
Back to top