wjones127 commented on code in PR #35568: URL: https://github.com/apache/arrow/pull/35568#discussion_r1219949741
########## docs/source/python/integration/dataset.rst: ########## @@ -0,0 +1,90 @@ +.. Licensed to the Apache Software Foundation (ASF) under one +.. or more contributor license agreements. See the NOTICE file +.. distributed with this work for additional information +.. regarding copyright ownership. The ASF licenses this file +.. to you under the Apache License, Version 2.0 (the +.. "License"); you may not use this file except in compliance +.. with the License. You may obtain a copy of the License at + +.. http://www.apache.org/licenses/LICENSE-2.0 + +.. Unless required by applicable law or agreed to in writing, +.. software distributed under the License is distributed on an +.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +.. KIND, either express or implied. See the License for the +.. specific language governing permissions and limitations +.. under the License. + +.. currentmodule:: pyarrow.dataset + +Extending PyArrow Datasets +========================== + +PyArrow provides a core protocol for datasets, so third-party libraries can both +produce and consume PyArrow datasets. + +Dataset Producers +----------------- + +If you are a library implementing a new data source, you'll want to be able to +produce a PyArrow-compatible dataset. Your dataset could be backed by the classes +implemented in PyArrow or you could implement your own classes. Either way, you +should implement the protocol below. + +When implementing the dataset, consider the following: + +* To scale to very large dataset, don't eagerly load all the fragments into memory. + Instead, load fragments once a filter is passed. This allows you to skip loading + metadata about fragments that aren't relevant to queries. For example, if you + have a dataset that uses Hive-style paritioning for a column ``date`` and the + user passes a filter for ``date=2023-01-01``, then you can skip listing directory + for HIVE partitions that don't match that date. Review Comment: The Hive-style partitioning was just an example. I think for Iceberg the equivalent statement would be something like: Iceberg dataset can skip loading manifest files that are irrelevant to the query, instead of loading every manifest file referenced in the manifest lists. Does that make sense? The overall idea is that the API allows you to treat the metadata itself as "big data" that you wouldn't want to scan in it's entirety. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
