Skip to content

Introduces a new LogicalType: FILE#585

Open
brkyvz wants to merge 15 commits into
apache:masterfrom
brkyvz:fileType
Open

Introduces a new LogicalType: FILE#585
brkyvz wants to merge 15 commits into
apache:masterfrom
brkyvz:fileType

Conversation

@brkyvz

@brkyvz brkyvz commented Jun 9, 2026

Copy link
Copy Markdown

Rationale for this change

Introduces a new type called File as a typed FileReference. The design document is here.

The motivation is as follows:

Unstructured data ingestion is getting extremely popular with the advances in Generative AI. 
Today, our only means of dealing with unstructured data is to store it as a binary blob inside Parquet, 
or point to files that exist in some object store with a string. These solutions fail to address these use 
cases, because of scalability, usability, and governance issues.

We would like to introduce a new logical type annotation in Parquet called “File” for storing a struct that 
contains a path reference to a file with additional metadata. This reference may be to a file that exists 
(or expected to exist) in storage at a given path. We’d like to define the minimum required list of fields 
that would allow a client to correctly read the referenced data. Any additional metadata can be optionally 
stored by engines and table formats as necessary adjacent to this type. 

What changes are included in this PR?

Introduces the specification for FileType.

Do these changes have PoC implementations?

Yes:

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated

@emkornfield emkornfield left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me a few minor comments for clarification.

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated

@etseidl etseidl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few questions I have after reviewing the Rust implementation.

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread LogicalTypes.md Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread LogicalTypes.md Outdated
Comment thread src/main/thrift/parquet.thrift
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread src/main/thrift/parquet.thrift Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
@brkyvz

brkyvz commented Jul 10, 2026

Copy link
Copy Markdown
Author

Addressed your comments, @rok @pitrou please take a look. There's only one unaddressed comment on the CompressionCodec, which I will address after talking to @alkis

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md
Comment thread LogicalTypes.md

@rdblue rdblue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few comments for clarification, but I think that this is ready either way.

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
@brkyvz

brkyvz commented Jul 17, 2026

Copy link
Copy Markdown
Author

@rdblue @wgtmac @mapleFU @RussellSpitzer Thank you for the feedback! Addressed your comments. Hopefully things are clearer now! Let me know if they aren't

Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
Comment thread LogicalTypes.md Outdated
dejankrak-db added a commit to dejankrak-db/delta that referenced this pull request Jul 22, 2026
…@ 90147dc)

Align with the latest apache/parquet-format#585 (commit 90147dc):
- path is now a URI-reference per RFC 3986 (absolute or relative), not an
  opaque location string. Resolves the path/uri debate: name stays `path`,
  semantics become URI.
- checksum form changes from <algorithm>:base64(<digest>) to <algorithm>:<digest>
  with per-algorithm encoding (lowercase hex for MD5/CRC32/CRC32C/SHA-256,
  opaque for ETAG); add RFC references and an Encoding column.
- content_type: MIME per RFC 2046, defaults to application/octet-stream when unset.
- offset must not be negative.
- Note that implementations are not expected to treat empty strings as null.

Co-authored-by: Isaac
@rok

rok commented Jul 22, 2026

Copy link
Copy Markdown
Member

@brkyvz can you reply on the path thread?

@brkyvz

brkyvz commented Jul 22, 2026

Copy link
Copy Markdown
Author

@brkyvz can you reply on the path thread?

@rok sorry that was hidden in the UI. Responded! We weren't planning on renaming the field. Just explaining that it is a URI

dejankrak-db added a commit to dejankrak-db/delta that referenced this pull request Jul 23, 2026
…@ 92228a1)

Align with the latest apache/parquet-format#585 (commit 92228a1):
- Update checksum RFC citations: MD5 -> RFC 1321, CRC32 -> RFC 2083,
  CRC32C -> RFC 3385 (SHA-256 unchanged at RFC 6234).
- Readers may return a null file value for a row whose reference is invalid.

Co-authored-by: Isaac
@rok

rok commented Jul 23, 2026

Copy link
Copy Markdown
Member

@brkyvz can you reply on the path thread?

@rok sorry that was hidden in the UI. Responded! We weren't planning on renaming the field. Just explaining that it is a URI

See my reply in the thread above. I don't think "we weren't planning" sufficiently answers this.

@brkyvz

brkyvz commented Jul 23, 2026

Copy link
Copy Markdown
Author

@rok @pitrou Renamed path to uri!

dejankrak-db added a commit to dejankrak-db/delta that referenced this pull request Jul 23, 2026
…o#585 @ 4223744)

Align with apache/parquet-format#585 (commit 4223744): the FILE locator field
was renamed from `path` to `uri`. Rename the field throughout the field table,
resolution table, Parquet examples, writer/reader requirements, statistics, and
prose. Generic uses of "path" (field path, absolute path) are unchanged, as is
the DBR-specific __FILE_TYPE_MODE storage-mode key.

Co-authored-by: Isaac

@rok rok left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @brkyvz this is a great addition to the format! Two minor nits that can also be ignored.

* MAP - undefined
* VARIANT - undefined
* GEOMETRY - undefined
* GEOGRAPHY - undefined

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* GEOGRAPHY - undefined
* FILE - undefined

Comment thread LogicalTypes.md
Comment on lines +757 to +758
can be renamed or relocated as a single unit.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
can be renamed or relocated as a single unit.
can be renamed or relocated as a single unit.
Parquet files containing self-references must not use Parquet modular encryption.
Self-referenced byte ranges are not Parquet encryption modules and therefore cannot
be encrypted or authenticated independently. Encryption of external files referenced
by `uri` is outside the scope of the Parquet format.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.