You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/11 13:04:53 UTC

[GitHub] [arrow] thisisnic commented on a diff in pull request #14361: ARROW-13766: [R] Add slice_*() methods

thisisnic commented on code in PR #14361:
URL: https://github.com/apache/arrow/pull/14361#discussion_r992300613


##########
r/R/expression.R:
##########
@@ -173,7 +173,12 @@ Expression$create <- function(function_name,
   assert_that(is.string(function_name))
   assert_that(is_list_of(args, "Expression"), msg = "Expression arguments must be Expression objects")
   expr <- compute___expr__call(function_name, args, options)
-  expr$schema <- unify_schemas(schemas = lapply(args, function(x) x$schema))
+  if (length(args)) {
+    expr$schema <- unify_schemas(schemas = lapply(args, function(x) x$schema))
+  } else {
+    # TODO: this shouldn't be necessary
+    expr$schema <- schema()
+  }

Review Comment:
   Just to check, what's the reason for this change?



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