Skip to main content

Module home_preview

Module home_preview 

Source
Expand description

The home screen’s ROWS preview: the first rows of the selected file, read the way the open reads them and handed to the open as its first page (#547 M4).

File reads are not spent twice. The worker runs the open’s own scan and schema read and fills the page the table would ask for first; the pane shows a few rows of it, and Enter installs the dataset it built. The open then has nothing left to read for that page, and no scan or schema read of its own.

Structs§

Prepared
A dataset built and its first page read, waiting for the open that will show it.
PreviewRows
The first rows of a file, as text, for the pane: the leading columns and how many there are in all.
Previews
The previews read this session, and the one dataset waiting to be opened.
ReadCounts
The reads of data the app has started, by kind: what a test counts to show a read was not made twice.
Stamp
What a file was when it was read: its size and modification time. A file that changed since is read again, and its old page is never installed.

Constants§

PREVIEW_ROWS
Rows the pane shows.

Functions§

previewable
Whether a row’s first rows are worth reading before it is opened: a local file of a format whose first page is cheap, under max_bytes (Parquet: its average row group). Nothing on a network share or in a store is read before it is opened.

Type Aliases§

Handoff
A prepared dataset passed from the preview to the open that takes it, once.