jonkeane commented on a change in pull request #12467:
URL: https://github.com/apache/arrow/pull/12467#discussion_r830264810



##########
File path: r/R/arrow-package.R
##########
@@ -95,6 +100,7 @@
   }
 }
 
+

Review comment:
       ```suggestion
   ```
   
   Nit pick: undo whitespace change

##########
File path: r/R/arrow-tabular.R
##########
@@ -98,6 +98,40 @@ ArrowTabular <- R6Class("ArrowTabular",
   )
 )
 
+tabular_as_data_frame_common <- function(x, base) {

Review comment:
       `base` here is a function that is either `Table__to_dataframe ` or 
`RecordBatch__to_dataframe` yeah? Basically the constructor to be used if this 
isn't an extension type? 
   
   It might be nice to have a slightly more descriptive name for that?
   

##########
File path: r/R/extension.R
##########
@@ -0,0 +1,437 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#' @include arrow-package.R
+#' @title class arrow::ExtensionArray

Review comment:
       ```suggestion
   #' @include arrow-package.R
   
   #' @title class arrow::ExtensionArray
   ```
   
   These should be separate, yeah?

##########
File path: r/R/arrow-tabular.R
##########
@@ -98,6 +98,40 @@ ArrowTabular <- R6Class("ArrowTabular",
   )
 )
 
+tabular_as_data_frame_common <- function(x, base) {
+  x_cols <- names(x)
+  col_is_extension <- vapply(
+    x_cols,
+    function(col) inherits(x$schema[[col]]$type, "ExtensionType"),
+    logical(1)
+  )
+
+  if (!any(col_is_extension)) {

Review comment:
       ```suggestion
     # If no columns are ExtensionTypes, we use our standard constructor
     if (!any(col_is_extension)) {
   ```




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to