[ 
https://issues.apache.org/jira/browse/ARROW-10953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ian Cook updated ARROW-10953:
-----------------------------
    Description: 
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.

  was:
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.


> [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
>            Reporter: Neal Richardson
>            Assignee: Ian Cook
>            Priority: Minor
>             Fix For: 4.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)

Reply via email to