forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-17318: [C++][Dataset] Support async streaming interface for get…
…ting fragments in Dataset (apache#13804) Add `GetFragmentsAsync()` and `GetFragmentsAsyncImpl()` functions to the generic `Dataset` interface, which allows to produce fragments in a streamed fashion. This is one of the prerequisites for making `FileSystemDataset` to support lazy fragment processing, which, in turn, can be used to start scan operations without waiting for the entire dataset to be discovered. To aid the transition process of moving to async implementation in `Dataset`/`AsyncScanner` code, a default implementation for `GetFragmentsAsyncImpl()` is provided (yielding a VectorGenerator over the fragments vector, which is stored by every implementation of Dataset interface at the moment). Tests: unit(release) Signed-off-by: Pavel Solodovnikov <[email protected]> Authored-by: Pavel Solodovnikov <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
- Loading branch information
Showing
6 changed files
with
171 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// 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. | ||
|
||
#pragma once | ||
|
||
#include <functional> | ||
|
||
#include "arrow/type_fwd.h" | ||
|
||
namespace arrow { | ||
|
||
template <typename T> | ||
using AsyncGenerator = std::function<Future<T>()>; | ||
|
||
template <typename T, typename V> | ||
class MappingGenerator; | ||
|
||
template <typename T, typename ComesAfter, typename IsNext> | ||
class SequencingGenerator; | ||
|
||
template <typename T, typename V> | ||
class TransformingGenerator; | ||
|
||
template <typename T> | ||
class SerialReadaheadGenerator; | ||
|
||
template <typename T> | ||
class ReadaheadGenerator; | ||
|
||
template <typename T> | ||
class PushGenerator; | ||
|
||
template <typename T> | ||
class MergedGenerator; | ||
|
||
template <typename T> | ||
struct Enumerated; | ||
|
||
template <typename T> | ||
class EnumeratingGenerator; | ||
|
||
template <typename T> | ||
class TransferringGenerator; | ||
|
||
template <typename T> | ||
class BackgroundGenerator; | ||
|
||
template <typename T> | ||
class GeneratorIterator; | ||
|
||
template <typename T> | ||
struct CancellableGenerator; | ||
|
||
template <typename T> | ||
class DefaultIfEmptyGenerator; | ||
|
||
} // namespace arrow |