Skip to content

GH-49946: [Format] Better document equivalence between IPC file and streams - #49947

Merged
pitrou merged 4 commits into
apache:mainfrom
pitrou:ipc-file-stream-equivalence
Jun 1, 2026
Merged

GH-49946: [Format] Better document equivalence between IPC file and streams#49947
pitrou merged 4 commits into
apache:mainfrom
pitrou:ipc-file-stream-equivalence

Conversation

@pitrou

@pitrou pitrou commented May 7, 2026

Copy link
Copy Markdown
Member

Rationale for this change

As discussed in https://lists.apache.org/thread/jpxl3yzm96wkxzb1clokxklsy32b3plh, we want to better document the rough equivalence between IPC files and streams.

What changes are included in this PR?

  • Recommendation around emitting "nice" IPC file footers that don't reorder, omit or repeat batches
  • Better outlining of deviations of the IPC file format vs. the IPC streaming format
  • Assorted minor wording and presentation improvements in the columnar / IPC doc

Are these changes tested?

N/A.

Are there any user-facing changes?

No.

@pitrou
pitrou force-pushed the ipc-file-stream-equivalence branch from 3da85f2 to 6ea2485 Compare May 7, 2026 14:27
@pitrou

pitrou commented May 7, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit preview-docs

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Revision: 6ea2485

Submitted crossbow builds: ursacomputing/crossbow @ actions-0208c5a8f4

Task Status
preview-docs GitHub Actions

@pitrou
pitrou force-pushed the ipc-file-stream-equivalence branch from 6ea2485 to 28765e5 Compare May 7, 2026 15:17
@pitrou

pitrou commented May 7, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit preview-docs

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Revision: 28765e5

Submitted crossbow builds: ursacomputing/crossbow @ actions-6cfd80b0e4

Task Status
preview-docs GitHub Actions

@pitrou
pitrou force-pushed the ipc-file-stream-equivalence branch from 28765e5 to 51fb5a1 Compare May 7, 2026 16:01
@pitrou

pitrou commented May 7, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit preview-docs

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Revision: 51fb5a1

Submitted crossbow builds: ursacomputing/crossbow @ actions-3cd6e7c16a

Task Status
preview-docs GitHub Actions

@pitrou

pitrou commented May 7, 2026

Copy link
Copy Markdown
Member Author

@paleolimbot paleolimbot 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.

Thank you for writing this up!

Comment thread docs/source/format/Columnar.rst Outdated
Comment thread docs/source/format/Columnar.rst Outdated
Comment on lines +1541 to +1542
compliant writers SHOULD arrange the IPC File footer so that an IPC File can be
read using an IPC Stream reader with equivalent results.

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.

It may be nice at some point to indicate in the "features" section of a flatbuffers Schema that the stream can definitely be read as an IPC stream (i.e., doesn't differ between what one would get from reading using the blocks in the footer). The fact that nanoarrow does this blindly is not great and I'll fix it, but it is a cool feature that you can do full scans without random access in most cases.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What do you call the features section? Is it

arrow/format/Schema.fbs

Lines 71 to 81 in a0d2885

enum Feature : long {
/// Needed to make flatbuffers happy.
UNUSED = 0,
/// The stream makes use of multiple full dictionaries with the
/// same ID and assumes clients implement dictionary replacement
/// correctly.
DICTIONARY_REPLACEMENT = 1,
/// The stream makes use of compressed bodies as described
/// in Message.fbs.
COMPRESSED_BODY = 2
}
? I don't think anyone is reading this table currently.

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.

That's what I was thinking of (but no need to deal with this now 🙂 )

@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels May 7, 2026
@pitrou

pitrou commented May 11, 2026

Copy link
Copy Markdown
Member Author

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels May 11, 2026
@pitrou
pitrou force-pushed the ipc-file-stream-equivalence branch from 51fb5a1 to 2f21cc8 Compare May 13, 2026 07:29
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels May 13, 2026
@pitrou

pitrou commented May 13, 2026

Copy link
Copy Markdown
Member Author

I've reworded the equivalence section to also mention the Schema and custom metadata in the IPC file footer.

Again @alamb @tustvold @CurtHagenlocher @zeroshade @jbonofre @lidavidm do you want to take a look? This is a (minor) spec update, I would rather find consensus on this.

@pitrou

pitrou commented May 13, 2026

Copy link
Copy Markdown
Member Author

Also @joellubi

@pitrou

pitrou commented May 13, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit preview-docs

@pitrou
pitrou marked this pull request as ready for review May 13, 2026 07:38
@github-actions

Copy link
Copy Markdown

Revision: 2f21cc8

Submitted crossbow builds: ursacomputing/crossbow @ actions-49a37905b6

Task Status
preview-docs GitHub Actions

@github-actions github-actions Bot removed the awaiting change review Awaiting change review label May 13, 2026
@github-actions github-actions Bot added the awaiting merge Awaiting merge label May 13, 2026

@CurtHagenlocher CurtHagenlocher 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.

Thanks! These improvements are great!

@alamb alamb 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 like a very nice improvement to me. Thank you @pitrou

The ``Buffer`` Flatbuffers value describes the location and size of a
piece of memory. Generally these are interpreted relative to the
**encapsulated message format** defined below.
buffer 0: field 0 ('col1') validity

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.

this is much nicer

Comment thread docs/source/format/Columnar.rst Outdated
Comment thread docs/source/format/Columnar.rst Outdated
pitrou and others added 2 commits June 1, 2026 10:02
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
@pitrou
pitrou merged commit 35eed28 into apache:main Jun 1, 2026
10 checks passed
@pitrou pitrou removed the awaiting merge Awaiting merge label Jun 1, 2026
@pitrou
pitrou deleted the ipc-file-stream-equivalence branch June 1, 2026 08:49
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 35eed28.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 3 possible false positives for unstable benchmarks that are known to sometimes produce them.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants