Skip to content

Send H5S_NULL shape when creating null space datasets - #303

Merged
mattjala merged 1 commit into
masterfrom
fix/null-shape-dataset-create
Sep 25, 2026
Merged

mattjala merged 1 commit into
masterfrom
fix/null-shape-dataset-create

Conversation

@mattjala

Copy link
Copy Markdown
Collaborator

HsdsPlugin.createObjects() only put a "shape" key in the dataset create request for H5S_SIMPLE shapes. For H5S_NULL it left the key out, and HSDS treats a missing shape as scalar, so every null space dataset created through h5pyd (including via hsload) was stored as H5S_SCALAR. Reading it back then returned a scalar value instead of Empty.

After this PR, it will send "H5S_NULL" for null shapes, which HSDS already accepts.

The existing null space tests didn't catch this because they read the shape from the client-side cache. The new test reopens the file so the shape comes from the server, and checks that a scalar dataset stays scalar.

HsdsPlugin.createObjects() only put a "shape" key in the dataset create
request for H5S_SIMPLE shapes. For H5S_NULL it left the key out, and
HSDS treats a missing shape as scalar, so every null space dataset
created through h5pyd (including via hsload) was stored as H5S_SCALAR.
Reading it back then returned a scalar value instead of Empty.

After this PR, it will send "H5S_NULL" for null shapes, which HSDS already accepts.

The existing null space tests didn't catch this because they read the
shape from the client-side cache. The new test reopens the file so the
shape comes from the server, and checks that a scalar dataset stays
scalar.
@mattjala mattjala added this to the h5pyd 1.1.0 milestone Sep 25, 2026
@mattjala mattjala added the bug label Sep 25, 2026
@github-project-automation github-project-automation Bot moved this to To be triaged in HSDS - TRIAGE & TRACK Sep 25, 2026
@mattjala
mattjala merged commit 8e971ee into master Sep 25, 2026
12 checks passed
@mattjala
mattjala deleted the fix/null-shape-dataset-create branch September 25, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

1 participant