Commits


orgadish authored and GitHub committed a0e58f18dc6
GH-38033: [R] Allow `code()` to return package name prefix. (#38144) ### Rationale for this change #38033 ### What changes are included in this PR? - ~~Added `get_pkg_ns()` helper.~~ - ~~Added `call_name` private method to `DataType` class to store the string name used in the code call. Refactored `code()` public method to use `call_name`.~~ - Converted all `$code() call(...)` to `$code(namespace = FALSE) call2(..., .ns = if(namespace) "arrow")` in `DataType`, `Schema`, and `DictionaryType`. - Added `code` to `Schema` docstring. - Updated `expect_code_roundtrip` to test roundtrip with and without namespace, and check match/no match for `arrow::` depending on namespace argument. ### Are these changes tested? * All tests pass, including lintr checks. ### Are there any user-facing changes? Yes, user-facing changes, but no breaking changes to any public APIs. * Closes: #38033 Lead-authored-by: orgadish <48453207+orgadish@users.noreply.github.com> Co-authored-by: Nic Crane <thisisnic@gmail.com> Signed-off-by: Nic Crane <thisisnic@gmail.com>