Skip to content

Commit

Permalink
Fix copyPreserveEncodings for LazyVector (#11855)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #11855

When loading data without a predicate we can the hive connector can return some LazyVectors. Currently the data sink attempts a call to copyPreserveEncodings (which is unsupported by LazyVector) to get a long lived owned copy of the data against its own memory pool. Putting this aside, we actually want to see impulse preload this data ahead of time for reliable query perf.

This diff patches LazyVector::copyPreserveEncodings and ensures Impulse preloads data prior to obtaining a copy.

Reviewed By: Yuhta

Differential Revision: D67204919

fbshipit-source-id: 189a0877824872f355c5a7677be0219318722460
  • Loading branch information
Joe Giardino authored and facebook-github-bot committed Dec 16, 2024
1 parent 2d31862 commit ba43948
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions velox/vector/LazyVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,9 @@ class LazyVector : public BaseVector {
void validate(const VectorValidateOptions& options) const override;

VectorPtr copyPreserveEncodings(
velox::memory::MemoryPool* /* pool */ = nullptr) const override {
VELOX_UNSUPPORTED("copyPreserveEncodings not defined for LazyVector");
velox::memory::MemoryPool* pool = nullptr) const override {
VELOX_CHECK(isLoaded());
return loadedVector()->copyPreserveEncodings(pool);
}

private:
Expand Down

0 comments on commit ba43948

Please sign in to comment.