when to use std::int32_t and std::int64_t
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Review the prior discussions in pull requests 95, 88, and 89, then inspect the listed integer usages in src/util.hpp and src/vtquery.cpp. Done means reaching agreement on when each integer width should be used and documenting or applying the resulting decision across the referenced functions.
Written by the indexing model from the issue text.
Description
Description
Looks like there have been some conversations around this and thought we should discuss all the places where we need to be explicit about the bit size of the int and when we shouldn't. I'll start us off with refs to previous conversations and lists of our current int32_t and int64_t usage. It would be great to get some follow-up comments about the reasoning behind this.
It looks like the idea is that we want to use int32_t for x, y, z, and extent until we cast them to doubles or int64_ts when we store them in a mapbox::geometry::point. Looks like we use int64_t for id and property values, referred to as v in the code.
References
- https://github.com/mapbox/vtquery/pull/95#discussion_r198340002
- https://github.com/mapbox/vtquery/pull/88
- https://github.com/mapbox/vtquery/pull/89
int32_t/ uint32_t usage
create_query_point- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L54-L57convert_vt_to_ll- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L84-L87TileObject- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L64-L66 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L93-L95QueryData- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L102 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L128Execute- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L278 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L301-L304HandleOKCallback- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L433NAN_METHOD(vtquery)- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L507-L536 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L605-L613 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L651
int64_t/ uint64_t usage
mapbox::util::variant- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L40create_query_point- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L52 & https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L68-L78convert_vt_to_ll- https://github.com/mapbox/vtquery/blob/master/src/util.hpp#L89ResultObject- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L44property_value_visitor- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L144-L147insert_result- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L201Execute- https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L306 & https://github.com/mapbox/vtquery/blob/master/src/vtquery.cpp#L317
- Dominant language
- JavaScript
- Stars
- 45
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mapbox/vtquery
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
-
union geometriesOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
dedupe is too strongOpen
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
amponce/archive-movie-browser#354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
saayam-for-all/webapp#1870 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Imageomics/OpenCite#66 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
chr15m/twiiit.com#20 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
antropos17/Aegis#629 ·
Maintainers usually reply within 4 days