Skip to content

Support unknown delete-file sizes in externally constructed scan tasks #3344

Description

@unikdahal

Part of #3343.

What's the feature are you trying to implement?

FileScanTaskDeleteFile::file_size_in_bytes is required to open a Parquet delete file, because the reader uses it to locate the Parquet footer. Tasks planned by iceberg-rust from manifest entries always carry it, but execution engines that build FileScanTasks themselves (for example from tasks planned on the JVM) do not always have it. Today such an engine must stat every delete file while building tasks — one metadata request per delete file, made before it is known whether the data file will be read at all — and passing 0 instead makes the delete file fail to open.

Proposal: treat file_size_in_bytes == 0 as "size unavailable" for externally constructed tasks, and let the Parquet delete-file loader resolve the size with one metadata request when it first loads the file.

Expected behavior:

  • Manifest-planned tasks continue using the recorded size; known sizes require no additional metadata request.
  • Unknown sizes are resolved lazily from storage when the delete file is first loaded. CachingDeleteFileLoader already loads each delete file once per reader, so the lookup happens once per delete file even when many data files reference it.
  • A failed metadata request fails the read with delete-file context while preserving the storage error's kind and retryability.
  • A size below the 8-byte Parquet footer minimum, whether resolved or supplied, fails explicitly rather than being read as "no deletes".
  • Position, equality and encrypted Parquet delete files continue to work; deletion vectors do not use this size and are unaffected.

This is independently useful for execution engines constructing Iceberg scan tasks and is one of the reader foundations required by #3343.

Willingness to contribute

I can contribute to this feature independently; an implementation with tests is ready.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions