Sober7135 opened a new issue, #865:
URL: https://github.com/apache/incubator-graphar/issues/865
### Describe the enhancement requested
## Background
The current public metadata APIs expose multiple count/index/version fields
typed as `int`.
* The width of `int` is platform-dependent.
* Some lookup APIs rely on `-1` as a sentinel value.
## Candidate APIs to update (metadata layer)
- `VertexInfo::PropertyGroupNum()`
- `VertexInfo::GetPropertyGroupByIndex(int index)`
- `EdgeInfo::PropertyGroupNum()`
- `EdgeInfo::GetPropertyGroupByIndex(int index)`
- `GraphInfo::GetVertexInfoIndex(...)`
- `GraphInfo::GetEdgeInfoIndex(...)`
- `GraphInfo::VertexInfoNum()`
- `GraphInfo::EdgeInfoNum()`
- `GraphInfo::GetVertexInfoByIndex(int index)`
- `GraphInfo::GetEdgeInfoByIndex(int index)`
- `InfoVersion` constructor / version-related APIs using raw `int`
## Proposed solution
Replace `int` with a fixed-width integer type or `size_t`.
However, this may be API-breaking, and there are multiple candidates:
### For count/index fields
* `size_t` — aligns with the C++ standard library (e.g., container `size()`
and `operator[]`).
* `int32_t`
* `uint32_t`
* …
### For version fields (`InfoVersion`)
* `int32_t` or `uint32_t` should be sufficient.
## Compatibility / migration
Do we need to deprecate the existing functions first and introduce a new
`v2` API?
### Component(s)
C++
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]