MichaelChirico commented on a change in pull request #28387:
URL: https://github.com/apache/spark/pull/28387#discussion_r416459279



##########
File path: R/pkg/R/types.R
##########
@@ -88,11 +88,6 @@ specialtypeshandle <- function(type) {
 checkSchemaInArrow <- function(schema) {
   stopifnot(inherits(schema, "structType"))
 
-  requireNamespace1 <- requireNamespace

Review comment:
       I checked all the usages of `checkSchemaInArrow`:
   
   ```
   grep -Fnr "checkSchemaInArrow" R
   R/types.R:88:checkSchemaInArrow <- function(schema) {
   R/SQLContext.R:277:        checkSchemaInArrow(schema)
   R/group.R:235:      checkSchemaInArrow(schema)
   R/DataFrame.R:1211:                checkSchemaInArrow(schema(x))
   R/DataFrame.R:1509:      checkSchemaInArrow(schema)
   ```
   
   These are all within branches that have checked
   
   ```
   arrowEnabled <- sparkR.conf("spark.sql.execution.arrow.sparkr.enabled")[[1]] 
== "true"
   ```
   
   Since `arrow` is not directly used and this conf check is passed already, I 
think the `requireNamespace` here is unnecessary.




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to