Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dwio/nimble/encodings/tests/EncodingSelectionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ TEST(EncodingSelectionTests, TestNullable) {
// test getRawDataSize
auto size =
facebook::nimble::test::TestUtils::getRawDataSize(*pool, serialized);
auto expectedSize = 15 + 6; // 15 bytes for string data, 6 bytes for nulls
auto expectedSize = 15 + 10; // 15 bytes for string data, 10 bytes for nulls
ASSERT_EQ(size, expectedSize);

LOG(INFO) << "Final size: " << serialized.size();
Expand Down
7 changes: 2 additions & 5 deletions dwio/nimble/encodings/tests/TestUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,8 @@ uint64_t TestUtils::getRawDataSize(
if (encodingType == EncodingType::Nullable) {
auto pos = encodingStr.data() + kPrefixSize;
auto nonNullsSize = encoding::readUint32(pos);
auto nonNullsCount = encoding::peek<uint32_t>(pos + kRowCountOffset);
// We do not count the bits indicating non-null, therefore we only
// include the size of the null bits and the non-null values.
return getRawDataSize(memoryPool, {pos, nonNullsSize}) +
(rowCount - nonNullsCount);
// Sum of the nulls count and size of the non-null child encoding.
return getRawDataSize(memoryPool, {pos, nonNullsSize}) + rowCount;
} else {
if (dataType != DataType::String) {
auto typeSize = nimble::detail::dataTypeSize(dataType);
Expand Down
2 changes: 1 addition & 1 deletion dwio/nimble/tablet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ target_include_directories(
)
add_dependencies(nimble_footer_fb nimble_footer_schema_fb)

add_library(nimble_tablet_common Compression.cpp, MetadataBuffer.cpp)
add_library(nimble_tablet_common Compression.cpp MetadataBuffer.cpp)
target_link_libraries(nimble_tablet_common nimble_footer_fb Folly::folly)

add_library(nimble_tablet_reader TabletReader.cpp)
Expand Down
3 changes: 1 addition & 2 deletions dwio/nimble/tablet/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
# 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.
add_executable(
nimble_tabletReader_tests TabletTest.cpp MetadataBufferTest.cpp)
add_executable(nimble_tabletReader_tests TabletTest.cpp MetadataBufferTest.cpp)

add_test(nimble_tabletReader_tests nimble_tabletReader_tests)

Expand Down
5 changes: 4 additions & 1 deletion dwio/nimble/velox/tests/VeloxWriterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2239,12 +2239,15 @@ TEST_F(VeloxWriterTests, fuzzComplex) {
}

const auto iterations = 20;
// provide sufficient buffer between min and max chunk size thresholds
constexpr uint64_t chunkThresholdBuffer = sizeof(int64_t) + sizeof(bool);
for (auto i = 0; i < iterations; ++i) {
writerOptions.minStreamChunkRawSize =
std::uniform_int_distribution<uint64_t>(10, 4096)(rng);
writerOptions.maxStreamChunkRawSize =
std::uniform_int_distribution<uint64_t>(
writerOptions.minStreamChunkRawSize, 8192)(rng);
writerOptions.minStreamChunkRawSize + chunkThresholdBuffer,
8192)(rng);
const auto batchSize =
std::uniform_int_distribution<uint32_t>(10, 400)(rng);
const auto batchCount = 5;
Expand Down
Loading