[ 
https://issues.apache.org/jira/browse/ARROW-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17022278#comment-17022278
 ] 

Michael Chirico commented on ARROW-7662:
----------------------------------------

I guess we were commenting at the same time, seems I found the right part of 
the code after all.

Is there a difference between ListType and StructType with respect to the need 
to enforce type consistency? My (rudimentary) understanding was that both 
StructType and ListType need fixed types -- StructType as (KeyType, ValueType) 
and ListType as just ValueType. So I was planning to just imitate that logic.

> [R] Support auto-inferring list column type
> -------------------------------------------
>
>                 Key: ARROW-7662
>                 URL: https://issues.apache.org/jira/browse/ARROW-7662
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>            Reporter: Michael Chirico
>            Priority: Major
>
> {code:r}
> DF = data.frame(a = 1:10)
> DF$b = as.list(DF$a)
> arrow::write_parquet(DF, 'test.parquet')
> # Error in Table__from_dots(dots, schema) : cannot infer type from data
> {code}
> This appears to be supported naturally already in Python:
> {code:python}
> import pandas as pd
> pd.DataFrame({'a': [1, 2, 3], 'b': [[1, 2], [3, 4], [5, 
> 6]]}).to_parquet('test.parquet')
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to