Skip to content

Commit

Permalink
make the test less funny and less confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Sep 14, 2022
1 parent 77be58b commit 1125462
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions r/tests/testthat/test-query-engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,15 @@ test_that("ExecPlanReader evaluates head() lazily", {
})

test_that("ExecPlanReader evaluates head() lazily", {
# make a 500-row RecordBatchReader
# Make a rather long RecordBatchReader
reader <- RecordBatchReader$create(
batches = rep(
list(
record_batch(
line = c(
"this is the RecordBatchReader that never ends",
"yes it goes on and on my friends",
"some ExecPlan started pulling from it",
"not knowing what it was, and hopefully won't",
"continue pulling on forever just because"
)
)
),
list(record_batch(line = letters)),
100L
)
)

# But only get 10 rows from it
# ...But only get 10 rows from it
query <- head(as_adq(reader), 10)
expect_identical(as_arrow_table(query)$num_rows, 10L)

Expand Down

0 comments on commit 1125462

Please sign in to comment.