Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add s2_cell <-> integer64 support #231

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Add s2_cell <-> integer64 support #231

merged 1 commit into from
Apr 19, 2023

Conversation

paleolimbot
Copy link
Collaborator

Closes #224.

library(s2)
(cells <- c(as_s2_cell(NA_character_), s2_cell_sentinel()))
#> <s2_cell[2]>
#> [1] NA               ffffffffffffffff
(int64s <- bit64::as.integer64(cells))
#> integer64
#> [1] <NA> -1
as_s2_cell(int64s)
#> <s2_cell[2]>
#> [1] NA               ffffffffffffffff

Created on 2023-04-19 with reprex v2.0.2

@codecov-commenter
Copy link

Codecov Report

Merging #231 (283faa9) into main (90ae67a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 283faa9 differs from pull request most recent head 2c00abf. Consider uploading reports for the commit 2c00abf to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #231      +/-   ##
==========================================
+ Coverage   94.02%   94.04%   +0.01%     
==========================================
  Files          46       46              
  Lines        3517     3524       +7     
==========================================
+ Hits         3307     3314       +7     
  Misses        210      210              
Impacted Files Coverage Δ
R/s2-cell.R 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@paleolimbot paleolimbot merged commit 9ce3f25 into main Apr 19, 2023
@paleolimbot paleolimbot deleted the cell-as-int64 branch April 19, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any possible translation of s2_cell to Int64 for BigQuery compatibility?
2 participants