-
Notifications
You must be signed in to change notification settings - Fork 92
Virtual #683
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
base: dataset-show-improvements
Are you sure you want to change the base?
Virtual #683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements Virtual Dataset support for JLD2.jl, allowing users to create datasets that reference data stored in other files without copying the data. This is particularly useful for large dataset management, data organization, and performance optimization.
Key Changes
- Implementation of HDF5 Virtual Dataset (VDS) format support in JLD2
- New API for creating and reading virtual datasets with automatic type and dimension inference
- Comprehensive test suite covering various virtual dataset scenarios including pattern-based mappings and error handling
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/virtual_datasets.jl |
Core virtual dataset implementation with VDS format support and high-level API |
src/datasets.jl |
Integration of virtual dataset reading logic into existing dataset handling |
src/datalayouts.jl |
Added virtual dataset layout detection and support |
src/headermessages.jl |
Enhanced virtual storage layout handling with proper documentation |
src/JLD2.jl |
Integration of virtual datasets module into main package |
test/virtual_datasets.jl |
Comprehensive test suite for virtual dataset functionality |
test/runtests.jl |
Added virtual dataset tests to test suite |
docs/virtual_datasets.md |
Complete documentation for virtual dataset features and usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/virtual_datasets.jl
Outdated
src_selection = src_all ? all_selection() : all_selection() # TODO: support partial selections | ||
vds_selection = vds_all ? all_selection() : all_selection() # TODO: support partial selections |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines have redundant logic where both branches of the ternary operator return the same value. Consider simplifying to just src_selection = all_selection()
and vds_selection = all_selection()
until partial selections are implemented.
src_selection = src_all ? all_selection() : all_selection() # TODO: support partial selections | |
vds_selection = vds_all ? all_selection() : all_selection() # TODO: support partial selections | |
src_selection = all_selection() # TODO: support partial selections | |
vds_selection = all_selection() # TODO: support partial selections |
Copilot uses AI. Check for mistakes.
src/virtual_datasets.jl
Outdated
if i > 100 | ||
break |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 100 should be defined as a named constant to improve maintainability and make the limit configurable. Consider defining const MAX_PATTERN_EXPANSION = 100
at the module level.
Copilot uses AI. Check for mistakes.
src/virtual_datasets.jl
Outdated
return DataLayout( | ||
UInt8(4), # version | ||
LcVirtual, # storage_type | ||
Int64(-1), # data_length (virtual datasets don't have fixed length) | ||
heap_address, # data_offset (actually heap address) | ||
UInt8(0), # dimensionality | ||
heap_index, # chunk_indexing_type (actually heap index) | ||
UInt64[] # chunk_dimensions | ||
) |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic number 4 for version should be defined as a named constant. Consider defining const VIRTUAL_LAYOUT_VERSION = UInt8(4)
to make the code more maintainable and self-documenting.
Copilot uses AI. Check for mistakes.
No description provided.