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


##########
r/tests/testthat/test-schema.R:
##########
@@ -315,5 +315,14 @@ test_that("schema extraction", {
 
   adq <- as_adq(example_data)
   expect_equal(schema(adq), adq$.data$schema)
+})
 
+test_that("schema print truncation", {
+  tbl <- arrow_table(example_data)
+  out <- print_schema_fields(schema(tbl), truncate = TRUE, max_fields = 1)
+  expect_output(
+    cat(out),
+    "int: int32\n...\n6 more columns\nUse `schema()` to see entire schema",
+    fixed = TRUE
+  )

Review Comment:
   Thanks Jon; yeah, that case is covered elsewhere, and I've added in an 
assertion that `max_fields > 0` and a corresponding test. 



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