You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "amoeba (via GitHub)" <gi...@apache.org> on 2023/03/07 02:02:54 UTC

[GitHub] [arrow] amoeba commented on a diff in pull request #34477: GH-34422: [R] Expose GcsFileSystem$options

amoeba commented on code in PR #34477:
URL: https://github.com/apache/arrow/pull/34477#discussion_r1127263632


##########
r/src/filesystem.cpp:
##########
@@ -422,4 +424,63 @@ std::shared_ptr<fs::GcsFileSystem> fs___GcsFileSystem__Make(bool anonymous,
   return fs::GcsFileSystem::Make(gcs_opts, io_context);
 }
 
+// [[gcs::export]]
+cpp11::list fs___GcsFileSystem__options(const std::shared_ptr<fs::GcsFileSystem>& fs) {
+  using cpp11::literals::operator"" _nm;
+
+  cpp11::writable::list out;
+
+  fs::GcsOptions opts = fs->options();
+
+  // GcsCredentials
+  out.push_back({"anonymous"_nm = opts.credentials.anonymous() });
+
+  if (opts.credentials.access_token() != "") {
+    out.push_back({"access_token"_nm = opts.credentials.access_token() });
+  }
+
+  // TODO: Cast to posixct?

Review Comment:
   This needs more work. What I'd like is to get this back to a POSIXct but I'm not sure how to do that.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org