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

[I] please expose the uni [arrow]

braindevices opened a new issue, #38807:
URL: https://github.com/apache/arrow/issues/38807

   ### Describe the enhancement requested
   
   in R there is `concat_tables(..., unify_schemas = TRUE)`(https://arrow.apache.org/docs/r/reference/concat_tables.html)
   In python this function does not allow concat table with different schema.
   
   
   > unify_schemas
   >
   >    If TRUE, the schemas of the tables will be first unified with fields of the same name being merged, then each table will be promoted to the unified schema before being concatenated. Otherwise, all tables should have the same schema.
   
   I tried the promote_options="permissive" which does not seem to do the trick.
   
   ```
   t1 = pa.Table.from_pydict({'a': [1., 2], 'b': [{'k1': 0, 'k2':1}, {'k3': 'ok'}]})
   t2 = pa.Table.from_pydict({'a': [1., None], 'b': [{'k1': None}, {'k3': None}]})
   
   pa.concat_tables([t1, t2], unify_schemas=True, promote_options="permissive")
   ```
   
   It will have `ArrowTypeError: struct fields don't match or are in the wrong order: Input fields: struct<k1: null, k3: null> output fields: struct<k1: int64, k2: int64, k3: string>`
   
   I expect this will be just ok
   
   
   ### Component(s)
   
   Parquet, Python


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] please expose the unify_schemas option in pyarrow.concat_tables [arrow]

Posted by "braindevices (via GitHub)" <gi...@apache.org>.
braindevices closed issue #38807: please expose the unify_schemas option in pyarrow.concat_tables
URL: https://github.com/apache/arrow/issues/38807


-- 
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: issues-unsubscribe@arrow.apache.org

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


Re: [I] please expose the unify_schemas option in pyarrow.concat_tables [arrow]

Posted by "braindevices (via GitHub)" <gi...@apache.org>.
braindevices commented on issue #38807:
URL: https://github.com/apache/arrow/issues/38807#issuecomment-1819839842

   this is actually a bug so I re-filed a bug insteaded


-- 
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