You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2022/10/18 15:59:00 UTC

[jira] [Updated] (ARROW-18087) [C++] RecordBatch::Equals ignores field names

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

Antoine Pitrou updated ARROW-18087:
-----------------------------------
    Fix Version/s: 11.0.0

> [C++] RecordBatch::Equals ignores field names
> ---------------------------------------------
>
>                 Key: ARROW-18087
>                 URL: https://issues.apache.org/jira/browse/ARROW-18087
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Joris Van den Bossche
>            Priority: Major
>             Fix For: 11.0.0
>
>
> The {{RecordBatch::Equals}} method only checks the equality of the schema of both batches if {{check_metadata=True}}, with a result that it doesn't actually check the schema (eg field names) by default.
> Python illustration:
> {code}
> In [3]: batch1 = pa.record_batch(pd.DataFrame({'a': [1, 2, 3]}))
> In [4]: batch2 = pa.record_batch(pd.DataFrame({'b': [1, 2, 3]}))
> In [5]: batch1.equals(batch2)
> Out[5]: True
> In [6]: batch1.equals(batch2, check_metadata=True)
> Out[6]: False
> {code}
> My expectation is that RecordBatch equality always requires equal field names (as Table::Equals does). And the {{check_metadata}} keyword should only control whether the metadata of the schema is considered (as the documentation also says), not whether the schema is checked at all.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)