You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Neal Richardson (Jira)" <ji...@apache.org> on 2021/05/11 19:51:00 UTC

[jira] [Commented] (ARROW-12722) [R] Raise error when attemping to create table with duplicated naming

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

Neal Richardson commented on ARROW-12722:
-----------------------------------------

Technically, in Arrow the names of fields in a Schema (and thus RecordBatch and Table) don't need to be unique. We may want to raise a warning in R when creating one, though. But I think the issue is that {{GetFieldByName}} errors if they're not unique. So that should error clearly.

> [R] Raise error when attemping to create table with duplicated naming
> ---------------------------------------------------------------------
>
>                 Key: ARROW-12722
>                 URL: https://issues.apache.org/jira/browse/ARROW-12722
>             Project: Apache Arrow
>          Issue Type: Improvement
>            Reporter: Nic Crane
>            Assignee: Nic Crane
>            Priority: Major
>
> It is currently possible to create a table (and possibly RecordBatch) with duplicated column names, which leads to later issues when trying to analyse the data - see the below example.
> An appropriate error should be raised instead of letting duplicate names to be used
>  
> {code:java}
> > Table$create(iris, iris) %>% filter(Species == "versicolor")
> Error in schm$GetFieldByName(name)$ToString() : attempt to apply non-function
> {code}



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