You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[R] Create a function registry for our NSE funcs #30529
This came up in the comments of ARROW-14575, but would be helpful even without doing anything with the namespace: instead of nse_funcs <- ..., create a registry + function to register each function and then use that registry in place of nse_funcs.
This will:
Give us a bit more freedom for defining bindings in separate files (though which nse_funcs+collate we could do the same). E.g. have one file per package
Possibly give a place to add some documentation (though see ARROW-15011)
Dewey Dunnington / @paleolimbot:
I think the main thing is to break up the definition of translations into a few files because the current file is getting quite long and contains some translation logic and some actual translations. This also helps with managing multiple function translation PRs (and the testing is separated anyway).
You can define related functions, aggregate functions, and (soon!) window functions next to each other
No need to worry about collate order (you're the onLoad thing already, caching all the functions into .cache$funcs)
You can export register_translation() and make translating to Arrow expressions another package's problem (e.g., geoarrow translations for st_literally_everything())
There's a place for namespacing if or when that gets supported
Activity
asfimport commentedon Dec 7, 2021
Dewey Dunnington / @paleolimbot:
I think the main thing is to break up the definition of translations into a few files because the current file is getting quite long and contains some translation logic and some actual translations. This also helps with managing multiple function translation PRs (and the testing is separated anyway).
Short reprex of what I was thinking:
This has some nice features:
.cache$funcs)register_translation()and make translating to Arrow expressions another package's problem (e.g., geoarrow translations forst_literally_everything())asfimport commentedon Jan 4, 2022
Jonathan Keane / @jonkeane:
Issue resolved by pull request 11904
#11904