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 2022/06/07 11:59:01 UTC

[GitHub] [arrow] lidavidm commented on a diff in pull request #13317: ARROW-16610: [Python] Raise an error for conflicting options in pq.write_to_dataset

lidavidm commented on code in PR #13317:
URL: https://github.com/apache/arrow/pull/13317#discussion_r891126993


##########
python/pyarrow/parquet/__init__.py:
##########
@@ -3101,6 +3101,26 @@ def file_visitor(written_file):
     >>> pq.ParquetDataset('dataset_name_4/', use_legacy_dataset=False).files
     ['dataset_name_4/...-0.parquet']
     """
+    # Check for conflicting kewords
+    msg_conflicting = (
+        "Arguments '{0}' and '{1}' can not be passed together. "
+        "'{0}' is supported with the new dataset implementation "
+        "and '{1}' with the legacy implementation."
+    )

Review Comment:
   Would it make sense to do something like switch the message based on use_legacy_dataset so that the error will be something like `"{0} is not supported by use_legacy_dataset=False, use {1}"` vs. `"{1} is not supported by use_legacy_dataset=True, use {0}"`?



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