nealrichardson commented on code in PR #13563:
URL: https://github.com/apache/arrow/pull/13563#discussion_r918203178


##########
r/tests/testthat/_snaps/dplyr-glimpse.md:
##########
@@ -0,0 +1,152 @@
+# glimpse() Table/ChunkedArray
+
+    Code
+      glimpse(tab)
+    Output
+      Table
+      10 rows x 7 columns
+      $ int           <int32> 1, 2, 3, NA, 5, 6, 7, 8, 9, 10
+      $ dbl          <double> 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, NA, 10.1
+      $ dbl2         <double> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+      $ lgl            <bool> TRUE, NA, TRUE, FALSE, TRUE, NA, NA, FALSE, 
FALSE, NA
+      $ false          <bool> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, ~
+      $ chr          <string> "a", "b", "c", "d", "e", NA, "g", "h", "i", "j"
+      $ fct <dictionary<...>> a, b, c, d, NA, NA, g, h, i, j
+      Call `print()` for full schema details
+
+---
+
+    Code
+      glimpse(tab$chr)
+    Output
+      <string> [ [ "a", "b", "c", "d", "e", null, "g", "h", "i", "j" ] ]
+
+# glimpse() RecordBatch/Array
+
+    Code
+      glimpse(batch)
+    Output
+      RecordBatch
+      10 rows x 7 columns
+      $ int           <int32> 1, 2, 3, NA, 5, 6, 7, 8, 9, 10
+      $ dbl          <double> 1.1, 2.1, 3.1, 4.1, 5.1, 6.1, 7.1, 8.1, NA, 10.1
+      $ dbl2         <double> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
+      $ lgl            <bool> TRUE, NA, TRUE, FALSE, TRUE, NA, NA, FALSE, 
FALSE, NA
+      $ false          <bool> FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, 
FALSE, ~
+      $ chr          <string> "a", "b", "c", "d", "e", NA, "g", "h", "i", "j"
+      $ fct <dictionary<...>> a, b, c, d, NA, NA, g, h, i, j
+      Call `print()` for full schema details
+
+---
+
+    Code
+      glimpse(batch$int)
+    Output
+      <int32> [ 1, 2, 3, null, 5, 6, 7, 8, 9, 10 ]
+
+# glimpse() with VctrsExtensionType
+
+    Code
+      glimpse(haven)
+    Output
+      Table
+      2 rows x 3 columns
+      $ num            <double> 5.1, 4.9
+      $ cat_int <ext<hvn_lbll>> 3, 1
+      $ cat_chr <ext<hvn_lbll>> Can't convert `x` <haven_labelled> to 
<character>.
+      Call `print()` for full schema details
+
+---
+
+    Code
+      glimpse(haven[[3]])
+    Output
+      <<haven_labelled[0]>> [ [ "B", "B" ] ]
+
+# glimpse prints message about schema if there are complex types
+
+    Code
+      glimpse(dictionary_but_no_metadata)
+    Output
+      Table
+      5 rows x 2 columns
+      $ a           <int32> 1, 2, 3, 4, 5
+      $ b <dictionary<...>> 1, 2, 3, 4, 5
+      Call `print()` for full schema details
+
+---
+
+    Code
+      glimpse(Table$create(a = 1))
+    Output
+      Table
+      1 rows x 1 columns
+      $ a <double> 1
+
+# glimpse() calls print() instead of showing data for RBR
+
+    Code
+      example_data %>% as_record_batch_reader() %>% glimpse()
+    Message <simpleMessage>
+      Cannot glimpse() data from a RecordBatchReader because it can only be 
read one time; call `as_arrow_table()` to consume it first

Review Comment:
   Fix to match the previous punctuation change. 
   
   ```suggestion
         Cannot glimpse() data from a RecordBatchReader because it can only be 
read one time; call `as_arrow_table()` to consume it first.
   ```



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