@@ -57,7 +57,7 @@ spec_arrow_write_table_arrow <- list(
57
57
skip_if_not_dbitest(ctx , " 1.8.0.38" )
58
58
59
59
# ' An error is also raised
60
- test_in <- stream_frame (a = 1L )
60
+ test_in <- data.frame (a = 1L )
61
61
# ' if `name` cannot be processed with [dbQuoteIdentifier()] or
62
62
expect_error(dbWriteTableArrow(con , NA , test_in %> % stream_frame()))
63
63
# ' if this results in a non-scalar.
@@ -79,11 +79,6 @@ spec_arrow_write_table_arrow <- list(
79
79
expect_error(dbWriteTableArrow(con , table_name , test_in %> % stream_frame(), temporary = NA ))
80
80
# ' incompatible values,
81
81
expect_error(dbWriteTableArrow(con , table_name , test_in %> % stream_frame(), overwrite = TRUE , append = TRUE ))
82
- expect_error(dbWriteTableArrow(con , table_name , test_in %> % stream_frame(), append = TRUE ))
83
- # ' duplicate
84
- expect_error(dbWriteTableArrow(con , table_name , test_in %> % stream_frame()))
85
- # ' or missing names,
86
- expect_error(dbWriteTableArrow(con , table_name , test_in %> % stream_frame()))
87
82
88
83
# ' incompatible columns)
89
84
dbWriteTableArrow(con , table_name , test_in %> % stream_frame())
@@ -428,6 +423,8 @@ spec_arrow_write_table_arrow <- list(
428
423
429
424
# ' - 64-bit values (using `"bigint"` as field type); the result can be
430
425
arrow_write_table_arrow_roundtrip_64_bit_numeric = function (ctx , con ) {
426
+ skip(" Internal: Need to enhance test_arrow_roundtrip()" )
427
+
431
428
tbl_in <- data.frame (a = c(- 1e14 , 1e15 ))
432
429
test_arrow_roundtrip(
433
430
con , tbl_in ,
@@ -440,7 +437,7 @@ spec_arrow_write_table_arrow <- list(
440
437
},
441
438
#
442
439
arrow_write_table_arrow_roundtrip_64_bit_character = function (ctx , con ) {
443
- skip_if_not_dbitest( ctx , " 1.8.0.24 " )
440
+ skip( " Internal: Need to enhance test_arrow_roundtrip() " )
444
441
445
442
tbl_in <- data.frame (a = c(- 1e14 , 1e15 ))
446
443
tbl_exp <- tbl_in
@@ -457,7 +454,7 @@ spec_arrow_write_table_arrow <- list(
457
454
},
458
455
#
459
456
arrow_write_table_arrow_roundtrip_64_bit_roundtrip = function (ctx , con , table_name ) {
460
- skip_if_not_dbitest( ctx , " 1.8.0.23 " )
457
+ skip( " Internal: Need to enhance test_arrow_roundtrip() " )
461
458
462
459
tbl_in <- data.frame (a = c(- 1e14 , 1e15 ))
463
460
dbWriteTableArrow(con , table_name , tbl_in , field.types = c(a = " BIGINT" ))
@@ -510,31 +507,18 @@ spec_arrow_write_table_arrow <- list(
510
507
arrow_write_table_arrow_roundtrip_factor = function (ctx , con ) {
511
508
skip_if_not_dbitest(ctx , " 1.8.0.20" )
512
509
513
- # ' - factor (returned as character)
510
+ # ' - factor (possibly returned as character)
514
511
tbl_in <- data.frame (
515
512
a = factor (get_texts())
516
513
)
517
514
tbl_exp <- tbl_in
518
515
tbl_exp $ a <- as.character(tbl_exp $ a )
519
- test_arrow_roundtrip(con , tbl_in , tbl_exp )
520
- },
521
-
522
- arrow_write_table_arrow_roundtrip_raw = function (ctx , con ) {
523
- skip_if_not_dbitest(ctx , " 1.8.0.19" )
524
-
525
- # ' - list of raw
526
- # ' (if supported by the database)
527
- if (isTRUE(ctx $ tweaks $ omit_blob_tests )) {
528
- skip(" tweak: omit_blob_tests" )
529
- }
530
-
531
- tbl_in <- data.frame (id = 1L , a = I(list (as.raw(0 : 10 ))))
532
- tbl_exp <- tbl_in
533
- tbl_exp $ a <- blob :: as_blob(unclass(tbl_in $ a ))
534
516
test_arrow_roundtrip(
535
- con , tbl_in , tbl_exp ,
517
+ con ,
518
+ tbl_in ,
519
+ tbl_exp ,
536
520
transform = function (tbl_out ) {
537
- tbl_out $ a <- blob :: as_blob (tbl_out $ a )
521
+ tbl_out $ a <- as.character (tbl_out $ a )
538
522
tbl_out
539
523
}
540
524
)
@@ -764,8 +748,8 @@ test_arrow_roundtrip_one <- function(con, tbl_in, tbl_expected = tbl_in, transfo
764
748
dbWriteTableArrow(con , name , tbl_in %> % stream_frame())
765
749
}
766
750
767
- tbl_read <- check_df(dbReadTable( con , name , check.names = FALSE ) )
768
- tbl_out <- transform( tbl_read )
751
+ stream <- dbReadTableArrow( con , name )
752
+ tbl_out <- check_arrow( stream , transform )
769
753
expect_equal_df(tbl_out , tbl_expected )
770
754
}
771
755
0 commit comments