[
https://issues.apache.org/jira/browse/ARROW-10953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neal Richardson updated ARROW-10953:
------------------------------------
Reporter: Neal Richardson (was: Jianqiao.He)
> [R] Validate when creating Table with schema
> --------------------------------------------
>
> Key: ARROW-10953
> URL: https://issues.apache.org/jira/browse/ARROW-10953
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Affects Versions: 2.0.0
> Environment: > sessionInfo()
> R version 4.0.3 (2020-10-10)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Debian GNU/Linux 10 (buster)
> Matrix products: default
> BLAS: /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
> LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.3.5.so
> locale:
> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> other attached packages:
> [1] bigrquery_1.3.2 bigrquerystorage_0.1.0
> loaded via a namespace (and not attached):
> [1] Rcpp_1.0.5 cellranger_1.1.0 pillar_1.4.6
> [4] compiler_4.0.3 dbplyr_2.0.0 tools_4.0.3
> [7] odbc_1.3.0 getPass_0.2-2 digest_0.6.27
> [10] bit_4.0.4 gargle_0.5.0 jsonlite_1.7.1
> [13] memoise_1.1.0 lifecycle_0.2.0 tibble_3.0.4
> [16] pkgconfig_2.0.3 rlang_0.4.8 extraw_1.8.25
> [19] DBI_1.1.0 rstudioapi_0.13 curl_4.3
> [22] xml2_1.3.2 dplyr_1.0.2 httr_1.4.2
> [25] askpass_1.1 fs_1.5.0 generics_0.1.0
> [28] vctrs_0.3.5 hms_0.5.3 bit64_4.0.5
> [31] tidyselect_1.1.0 glue_1.4.2 data.table_1.13.2
> [34] R6_2.5.0 readxl_1.3.1 connect.cap_0.3.19
> [37] purrr_0.3.4 blob_1.2.1 magrittr_2.0.1
> [40] ellipsis_0.3.1 assertthat_0.2.1 keyring_1.1.0
> [43] arrow_2.0.0.20201117 openssl_1.4.3 crayon_1.3.4
> Reporter: Neal Richardson
> Priority: Minor
> Fix For: 3.0.0
>
>
> This segfaults:
> {code:java}
> tab <- Table$create(data.frame(), schema = schema(a = int32())
> as.data.frame(tab)
> {code}
> as does {{tab$a}}, i.e. just trying to extract the ChunkedArray.
> {{Table$create(data.frame(b=1), schema = schema(a = int32())}} creates a
> Table with column named a, overwriting the "b" column name.
> {{tab <- Table$create(data.frame(b=2, c=3), schema = schema(a = int32()))}},
> i.e. providing fewer fields in the schema than there are columns in the data,
> segfaults.
> There should be some validation that the schema matches the data provided.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)