Conversation
…t_info_by_idx Name-order attribute storage only supports forward enumeration, so H5_daos_attribute_get_name_by_name_order() always walks in increasing order internally now and remaps the target index for H5_ITER_DEC in the iteration callback instead - the same technique already used by the creation-order sibling function (H5_daos_attribute_get_name_by_crt_order). H5Aiterate/H5Aiterate_by_name with H5_ITER_DEC and H5Adelete_by_idx's name-order decreasing-order path are separate, harder problems (the former needs a real reverse streaming walk; the latter's existing index math appears to assume creation-order semantics for a name-order request) and are not addressed here.
Owner
Author
|
Folded into HDFGroup#73 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
H5Aget_name_by_idx,H5Aopen_by_idx, andH5Aget_info_by_idxwithH5_INDEX_NAME+H5_ITER_DECnow work, using the same target-index-remap technique the creation-order sibling function already uses (H5_daos_attribute_get_name_by_crt_order): walk forward (increasing order) internally, remap the requested decreasing-order index to its increasing-order equivalent (nattrs - 1 - idx) before comparing.Not addressed here (separate, harder problems)
H5Aiterate/H5Aiterate_by_namewithH5_ITER_DEC: needs an actual reverse streaming walk over all attributes, not just remapping a single target index.H5Adelete_by_idxwithH5_INDEX_NAME+H5_ITER_DEC: its existing index math inH5_daos_attribute_remove_from_crt_idxappears to assume the requested index is already a creation-order position, which isn't generally true for a name-order request. Needs a proper name-order-to-crt-order resolution step first, not a simple formula fix.Test plan
H5Aget_name_by_idx/H5Aopen_by_idx/H5Aget_info_by_idxwith decreasing order now return the correct attribute