dragosmg commented on a change in pull request #12240:
URL: https://github.com/apache/arrow/pull/12240#discussion_r797046722



##########
File path: r/src/type_infer.cpp
##########
@@ -72,7 +72,8 @@ std::shared_ptr<arrow::DataType> 
InferArrowTypeFromVector<INTSXP>(SEXP x) {
   } else if (Rf_inherits(x, "POSIXct")) {
     auto tzone_sexp = Rf_getAttrib(x, symbols::tzone);
     if (Rf_isNull(tzone_sexp)) {
-      return timestamp(TimeUnit::MICRO);
+      auto systzone_sexp = symbols::systzone;

Review comment:
       We want the brackets at the end if we call the function on the spot, 
don't we? The way I did it seems to work:
   ```r
        # defined the S expression 
         auto systzone_sexp = cpp11::package("base")["Sys.timezone"];
         # call it inside `CHAR(STRING_ELT())`
         return timestamp(TimeUnit::MICRO, CHAR(STRING_ELT(systzone_sexp(), 
0)));
   ```




-- 
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-unsubscr...@arrow.apache.org

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


Reply via email to