Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Vortex Layouts #1805

Merged
merged 13 commits into from
Jan 3, 2025
Merged

Initial Vortex Layouts #1805

merged 13 commits into from
Jan 3, 2025

Conversation

gatesn
Copy link
Contributor

@gatesn gatesn commented Jan 3, 2025

Initial implementation of the new structure of vortex layouts per #1676

  • Only flat layout works.
  • I'm not 100% sure on the trait APIs, these will evolve as we pad out the implementation.
  • StructLayout will be worked on as part of Projection Expressions #1782 so will probably come last.

Up next:

  • Implementation of ChunkedLayout

Open Questions:

  • What is the API that e.g. Python users have to precisely configure layout strategies? Can I override a layout writer for a specific field?
  • Similarly, how can we configure the layout scanners? Can I configure a level 0 chunked layout differently from level 2 in a chunk-of-struct-of-chunk world?

@gatesn gatesn marked this pull request as ready for review January 3, 2025 17:36
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct SegmentId(u32);

impl From<u32> for SegmentId {

Choose a reason for hiding this comment

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

For the curiosity of someone unfamiliar with the Vortex code base...how is a Segment defined? What is the relationship between a segment and a chunk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can think of a segment as some abstract buffer of bytes that can be stored anywhere.

Where ArrayData holds buffers, LayoutData holds segment IDs which can later be resolved to segments.

Hmmm... maybe I should just stick with the name "buffer"

@gatesn gatesn changed the title Vortex Layouts Initial Vortex Layouts Jan 3, 2025
@gatesn gatesn merged commit 60af509 into develop Jan 3, 2025
21 checks passed
@gatesn gatesn deleted the ngates/layouts branch January 3, 2025 20:16
Comment on lines +94 to +98
self.state = State::Reading(Reading {
chunk_idx,
chunk_layout,
statistics: None,
});
Copy link
Member

Choose a reason for hiding this comment

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

I think you want to support out of order reads, if one chunk is very big but you know you have to read the next chunk you don't have to block reading chunk + 1 on previous chunk

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.

3 participants