You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "westonpace (via GitHub)" <gi...@apache.org> on 2023/05/08 20:02:11 UTC

[GitHub] [arrow] westonpace commented on issue #35424: [Python] pyarrow.concat_tables raises error about different Schema if columns have different order

westonpace commented on issue #35424:
URL: https://github.com/apache/arrow/issues/35424#issuecomment-1538967610

   AFAIK, there is no way for Arrow to consistently determine the correct order.  In Arrow, columns are allowed to have duplicate names so something like this would be allowed:
   
   ```
   tab1 = pa.Table.from_pydict({
       "col": [1,2,3,4,5],
       "col": [6, 7, 8, 9, 10],
   })
   
   tab2 = pa.Table.from_pydict({
       "col": [6, 7, 8, 9,10],
       "col": [1,2,3,4,5],
   })
   ```
   
   Two tables with different schemas can't be combined.  You will need to normalize the schema in your code (or perhaps pandas) before providing it to Arrow.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org