You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org> on 2026/09/08 21:36:21 UTC
[PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Mandukhai-Alimaa opened a new pull request, #51248:
URL: https://github.com/apache/arrow/pull/51248
### Rationale for this change
Closes #51143
As storage formats standardize file-level references, Arrow needs a canonical in-memory representation to preserve these semantics across IPC streams, the C Data Interface, Arrow Flight, and language bindings. Without a canonical extension type, file fields lose their semantic metadata during serialization.
[DISCUSS] [thread in the mailing list](https://lists.apache.org/thread/5qw2k7rwstk0ol9ymds5qym81myznmpl)
### What changes are included in this PR?
Proposal and documentation for the `arrow.parquet.file` canonical extension type.
### Are these changes tested?
N/A
### Are there any user-facing changes?
Yes, this is an extension to the arrow format.
- Github Issue: https://github.com/apache/arrow/issues/51143
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org>.
Mandukhai-Alimaa commented on PR #51248:
URL: https://github.com/apache/arrow/pull/51248#issuecomment-5592208700
CC: @rok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4400635428
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,96 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
+ - ``Int64``
+ * - ``size``
+ - ``Int64``
+ * - ``content_type``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``checksum``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``inline``
+ - ``Binary``, ``LargeBinary``, or ``BinaryView``
+
+ The fields may be in any order and must be accessed by case-sensitive name,
+ not by position. Each field may occur at most once and may be omitted from
+ the ``Struct`` when it is not used. The ``Struct`` must not contain fields
+ other than those listed above.
+
+* Extension type parameters:
+
+ This type does not have any parameters.
+
+* Description of the serialization:
+
+ Extension metadata is an empty string.
+
+Relative URI resolution
+-----------------------
+
+Unlike in Parquet, an ``offset`` paired with a relative ``uri`` is meaningless
+in this extension type.
+
+Parquet readers can attempt to resolve relative URIs by checking for the
+referenced file relative to the source Parquet file's location. If successful,
+they should record the absolute URI in the Arrow array's ``uri`` field.
Review Comment:
Thinking about this - we can't really specify parquet behavior here, so maybe such language makes more sense.
```suggestion
Unlike in Parquet, an ``offset`` paired with a relative ``uri`` is hard to interpret
in this extension type. While Parquet file's location can suggest a starting
point for the relative path, an extension type will not carry no such
information.
It is up to the application layer to handle what the meaning of the relative
paths is if they are provided.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org>.
Mandukhai-Alimaa commented on PR #51248:
URL: https://github.com/apache/arrow/pull/51248#issuecomment-6424521967
Thanks for the feedback. I’ve removed the duplicated text and linked to the Parquet FILE spec instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390852603
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
For FileType in Parquet `offset` will point to a region of a `uri` referenced file. However Parquet allows for the `uri` to be relative. How should Arrow users interpret that?
How about we specify that `offset` with relative `uri` is - unlinke in Parquet - meaningless.
We can stop there or also recommend that Parquet reader can attempt and record absolute `uri`, by checking for the file relative to the source parquet file's location.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390852603
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
For FileType in Parquet `offset` will point to a region of the source parquet file. Here we don't have the obvious connection to a parquet file as we're in memory and there's no obvious file to read at the given offset.
How about we specify that `offset` by itself (without `uri`) is unlinke in Parquet meaningless.
We can stop there or also recommend that Parquet reader records parquet file's location as `uri` should `uri` be null and `offset` not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #51248:
URL: https://github.com/apache/arrow/pull/51248#issuecomment-5592208079
:warning: GitHub issue #51143 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390940985
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
Another open question here would be relative `uri`s. Should we encounter them, what do they mean?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4349990107
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,262 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage. This extension type preserves the semantics of the
+`Parquet FILE logical type <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__
+in Arrow columns.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
+ - ``Int64``
+ * - ``size``
+ - ``Int64``
+ * - ``content_type``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``checksum``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``inline``
+ - ``Binary``, ``LargeBinary``, or ``BinaryView``
+
+ The fields may be in any order and must be accessed by case-sensitive name,
+ not by position. Each field may occur at most once and may be omitted from
+ the ``Struct`` when it is not used. The ``Struct`` must not contain fields
+ other than those listed above.
+
+* Extension type parameters:
+
+ This type does not have any parameters.
+
+* Description of the serialization:
+
+ Extension metadata is an empty string.
+
+Field semantics
Review Comment:
unless there is a good reason to restate all the content, I think it should simply point at the Parquet spec
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4334442306
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,262 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage. This extension type preserves the semantics of the
+`Parquet FILE logical type <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__
+in Arrow columns.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
+ - ``Int64``
+ * - ``size``
+ - ``Int64``
+ * - ``content_type``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``checksum``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``inline``
+ - ``Binary``, ``LargeBinary``, or ``BinaryView``
+
+ The fields may be in any order and must be accessed by case-sensitive name,
+ not by position. Each field may occur at most once and may be omitted from
+ the ``Struct`` when it is not used. The ``Struct`` must not contain fields
+ other than those listed above.
+
+* Extension type parameters:
+
+ This type does not have any parameters.
+
+* Description of the serialization:
+
+ Extension metadata is an empty string.
+
+Field semantics
Review Comment:
For this section, should we quote the Parquet spec verbatim with explicit attribution at the start, or keep the current wording and label it as “adapted from the Parquet FILE logical type specification”? Either way, it would help to make the relationship explicit so readers know whether this is a direct quotation or a restatement intended to preserve the same semantics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390940985
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
Another open question here would be relative `uri`s. Should we encounter them, what do they mean?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "Mandukhai-Alimaa (via GitHub)" <gi...@apache.org>.
Mandukhai-Alimaa commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4392767306
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
Thanks, Rok. I added a section clarifying relative URI resolution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390852603
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
For FileType in Parquet `offset` will point to a region of a `uri` referenced file. However Parquet allows for the `uri` to be relative. How should Arrow users interpret that?
How about we specify that `offset` with relative `uri` is - unlinke in - Parquet meaningless.
We can stop there or also recommend that Parquet reader can attempt and record absolute `uri`, by checking relative to the source parquet file's location.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4390852603
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
For FileType in Parquet `offset` will point to a region of a `uri` referenced file. However Parquet allows for the `uri` to be relative. How should Arrow users interpret that?
How about we specify that `offset` with relative `uri` is - unlinke in Parquet - meaningless.
We can stop there or also recommend that Parquet reader can attempt and record absolute `uri`, by checking relative to the source parquet file's location.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4400635428
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,96 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
+ - ``Int64``
+ * - ``size``
+ - ``Int64``
+ * - ``content_type``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``checksum``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``inline``
+ - ``Binary``, ``LargeBinary``, or ``BinaryView``
+
+ The fields may be in any order and must be accessed by case-sensitive name,
+ not by position. Each field may occur at most once and may be omitted from
+ the ``Struct`` when it is not used. The ``Struct`` must not contain fields
+ other than those listed above.
+
+* Extension type parameters:
+
+ This type does not have any parameters.
+
+* Description of the serialization:
+
+ Extension metadata is an empty string.
+
+Relative URI resolution
+-----------------------
+
+Unlike in Parquet, an ``offset`` paired with a relative ``uri`` is meaningless
+in this extension type.
+
+Parquet readers can attempt to resolve relative URIs by checking for the
+referenced file relative to the source Parquet file's location. If successful,
+they should record the absolute URI in the Arrow array's ``uri`` field.
Review Comment:
```suggestion
Unlike in Parquet, an ``offset`` paired with a relative ``uri`` is hard to interpret
in this extension type. While Parquet file's location can suggest a starting
point for the relative path, an extension type will not carry no such
information.
It is up to the application layer to handle what the meaning of the relative
paths is if they are provided.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-51143: [Format] Add Parquet FILE canonical extension type [arrow]
Posted by "rok (via GitHub)" <gi...@apache.org>.
rok commented on code in PR #51248:
URL: https://github.com/apache/arrow/pull/51248#discussion_r4400557013
##########
docs/source/format/CanonicalExtensions.rst:
##########
@@ -546,6 +546,86 @@ Primitive Type Mappings
| UUID extension type | UUID |
+----------------------+------------------------+
+.. _parquet_file_extension:
+
+Parquet File
+============
+
+File represents a reference to a range of bytes stored inline or in an external
+file. It is intended for use cases such as file inventories, manifests, and
+references to unstructured data such as images or audio files in object
+storage.
+
+Field semantics, byte resolution rules, and value validation are defined by the
+`Parquet FILE logical type specification <https://github.com/apache/parquet-format/blob/master/LogicalTypes.md#file>`__.
+These requirements apply to this extension type.
+
+* Extension name: ``arrow.parquet.file``.
+
+* The storage type of this extension is a ``Struct`` containing at least one of
+ the following nullable fields:
+
+ .. list-table::
+ :header-rows: 1
+
+ * - Field
+ - Type
+ * - ``uri``
+ - ``String``, ``LargeString``, or ``StringView``
+ * - ``offset``
Review Comment:
Thanks! I'll resolve this comment and add suggest an improvement in place.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org