feat: define pyramid named hierarchy API parameters#2104
Conversation
Signed-off-by: JiangChao <jacllovey@qq.com> Assisted-by: Codex:gpt-5
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Require kind labelWonderful, this rule succeeded.
🟢 Require version labelWonderful, this rule succeeded.
🟢 Require linked issue for feature/bug PRsWonderful, this rule succeeded.
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for named hierarchies within the Dataset class, allowing paths to be associated with specific hierarchies. It also adds parsing, serialization, and compatibility checks for pyramid hierarchy parameters. Currently, named hierarchy operations (search, add, build) are reserved but not implemented in the Pyramid algorithm, throwing validation errors if used. The review feedback points out a robustness issue in PyramidHierarchyParameters::FromJson where a non-string, non-object JSON input could cause an unhandled exception, and suggests adding an explicit object type check.
Signed-off-by: JiangChao <jacllovey@qq.com> Assisted-by: Codex:gpt-5
Signed-off-by: JiangChao <jacllovey@qq.com> Assisted-by: Codex:gpt-5
aa836d7 to
bb0cc29
Compare
|
CI failure note: the current Failure signature from this run: This is the same assertion described in #2083. Other checks in this run passed, including format, ASan build, compatibility, unit tests, examples, and TSAN tests. I think rerunning the failed functest job is the right handling here unless it reproduces with a different failure signature. |
Signed-off-by: JiangChao <jacllovey@qq.com> Assisted-by: Codex:gpt-5
Change Type
Linked Issue
What Changed
Dataset::Paths(name, paths)andDataset::GetPaths(name).hierarchies, including per-hierarchyno_build_levelsvalidation.hierarchyand reserved multi-hierarchyhierarchies+hierarchy_opselectors.Test Evidence
make fmtmake lintmake testmake cov, run tests, and collect coverageTest details:
Compatibility Impact
Performance and Concurrency Impact
Documentation Impact
README.mdDEVELOPMENT.mdCONTRIBUTING.mdRisk and Rollback
Checklist
kind/bugandkind/feature; see "Linked Issue" above)[skip ci]prefix)