You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/05/03 13:17:46 UTC

[GitHub] [arrow] jorisvandenbossche commented on a change in pull request #10224: ARROW-12631: [Python] Accept Scanner in pyarrow.dataset.write_dataset

jorisvandenbossche commented on a change in pull request #10224:
URL: https://github.com/apache/arrow/pull/10224#discussion_r625078445



##########
File path: python/pyarrow/dataset.py
##########
@@ -733,19 +733,17 @@ def write_dataset(data, base_dir, basename_template=None, format=None,
     """
     from pyarrow.fs import _resolve_filesystem_and_path
 
-    if isinstance(data, Dataset):
-        schema = schema or data.schema

Review comment:
       We are extracting the `schema` here, but this is not actually used any more, if the user passes a Dataset or Scanner. 
   
   This should be better documented, but to avoid surprises, could also error in that case? (or only if the schema's are not equal)




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

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