You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Dominik Moritz (Jira)" <ji...@apache.org> on 2022/01/09 02:56:00 UTC

[jira] [Commented] (ARROW-13861) [JS] Create Field with List type will throw error

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

Dominik Moritz commented on ARROW-13861:
----------------------------------------

In https://github.com/apache/arrow/pull/10371 you can do

{code:js}
const vector = vectorFromArray([[1, 2], [2, 3]], new List(Field.new({ name: 'field', type: new Uint8 })));
console.log(vector.toArray());
{code}

```

> [JS] Create Field with List type will throw error
> -------------------------------------------------
>
>                 Key: ARROW-13861
>                 URL: https://issues.apache.org/jira/browse/ARROW-13861
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: JavaScript
>    Affects Versions: 5.0.0
>            Reporter: zizhao.chen
>            Priority: Major
>              Labels: arrow
>
>  
> const field_vector=new ApacheArrow.Field(
>   "field_vector",
>   new ApacheArrow.List(new ApacheArrow.Float32(), 4),
>   false
> );
>  
> Will throw error{color:#FF0000} TypeError: Cannot read property 'children' of undefined{color}
> Source code: [https://github.com/apache/arrow/blob/master/js/src/schema.ts#L137]
>  
> If it's a bug, i'd like to fix this.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)