Skip to content

Commit

Permalink
fix: Fix CopyPreserveEncodingsTest.lazyNoNulls (#11887)
Browse files Browse the repository at this point in the history
Summary:

#11855 updated LazyVector:: copyPreserveEncodings() but didn't update the unit test. This diff fixes the failing test.

Reviewed By: Yuhta

Differential Revision: D67318403
  • Loading branch information
kagamiori authored and facebook-github-bot committed Dec 17, 2024
1 parent e46cb76 commit f67f861
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions velox/vector/tests/CopyPreserveEncodingsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,12 @@ TEST_F(CopyPreserveEncodingsTest, flatNoNulls) {
TEST_F(CopyPreserveEncodingsTest, lazyNoNulls) {
auto lazyVector = vectorMaker_.lazyFlatVector<int32_t>(
10, [](vector_size_t row) { return row; });
VELOX_ASSERT_THROW(lazyVector->copyPreserveEncodings(), "");

VELOX_ASSERT_THROW(
lazyVector->copyPreserveEncodings(),
"copyPreserveEncodings not defined for LazyVector");
auto copy = lazyVector->loadedVector()->copyPreserveEncodings();
assertEqualVectors(lazyVector, copy);
ASSERT_EQ(copy->encoding(), VectorEncoding::Simple::FLAT);
ASSERT_EQ(copy->nulls(), nullptr);
}

TEST_F(CopyPreserveEncodingsTest, sequenceHasNulls) {
Expand Down

0 comments on commit f67f861

Please sign in to comment.