forked from apache/incubator-gluten
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add non-blocking support for DwrfReader (#8884)
Summary: Pull Request resolved: facebookincubator/velox#8884 Create a non-io-blocking interface for the reader. This way the main thread won't be blocked on IO if that thread isn't meant to be an IO thread. Reviewed By: Yuhta Differential Revision: D54282154 fbshipit-source-id: 8081578d5bc9c7a4d86ed34b24a188dc062eeff7
- Loading branch information
1 parent
21242cb
commit 49d1224
Showing
4 changed files
with
169 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* Licensed 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 "velox/dwio/common/ResultOrActions.h" | ||
|
||
namespace facebook::velox::dwio::common { | ||
|
||
enum class ReaderStepState { | ||
// Success, will contain the result | ||
kSuccess, | ||
|
||
// IO is needed to read more data. There will be one or more actions | ||
// (callbacks) to do the IO. | ||
kNeedsIO, | ||
}; | ||
|
||
template <typename ResultType> | ||
struct StateAndResultOrIoActions { | ||
ReaderStepState state; | ||
ResultOrActions<ResultType> resultOrIoActions; | ||
}; | ||
|
||
using StateAndIoActions = StateAndResultOrIoActions<folly::Unit>; | ||
|
||
} // namespace facebook::velox::dwio::common |
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