Skip to content

Commit

Permalink
Pass UnitLoaderFactory to DwrfReader (facebookincubator#9473)
Browse files Browse the repository at this point in the history
Summary:

Pass factory in RowReader options.

Reviewed By: helfman

Differential Revision: D55999801
  • Loading branch information
Daniel Munoz authored and facebook-github-bot committed Apr 15, 2024
1 parent 5c125cc commit fa177b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions velox/dwio/common/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "velox/dwio/common/FlushPolicy.h"
#include "velox/dwio/common/InputStream.h"
#include "velox/dwio/common/ScanSpec.h"
#include "velox/dwio/common/UnitLoader.h"
#include "velox/dwio/common/encryption/Encryption.h"

namespace facebook::velox::dwio::common {
Expand Down Expand Up @@ -145,6 +146,7 @@ class RowReaderOptions {
std::function<void(uint16_t)> stripeCountCallback_;
bool eagerFirstStripeLoad = true;
uint64_t skipRows_ = 0;
std::shared_ptr<UnitLoaderFactory> unitLoaderFactory_;

public:
RowReaderOptions() noexcept
Expand Down Expand Up @@ -385,6 +387,15 @@ class RowReaderOptions {
return skipRows_;
}

void setUnitLoaderFactory(
std::shared_ptr<UnitLoaderFactory> unitLoaderFactory) {
unitLoaderFactory_ = std::move(unitLoaderFactory);
}

const std::shared_ptr<UnitLoaderFactory>& getUnitLoaderFactory() const {
return unitLoaderFactory_;
}

const std::shared_ptr<folly::Executor>& getDecodingExecutor() const {
return decodingExecutor_;
}
Expand Down

0 comments on commit fa177b7

Please sign in to comment.