Skip to content

Commit

Permalink
Fix TableWriteTest compression selection (facebookincubator#7141)
Browse files Browse the repository at this point in the history
Summary:
The test was reading the wrong bits representing the compression value.
Instead it was reading the multiDriver (0 or 1) setting which resulted in either no compression or ZLIB compression (1) instead of ZSTD (4).

Pull Request resolved: facebookincubator#7141

Reviewed By: amitkdutta

Differential Revision: D50539168

Pulled By: xiaoxmeng

fbshipit-source-id: 1a7fff44f44fc1e49333a1c894f2508e65ba2fb7
  • Loading branch information
czentgr authored and facebook-github-bot committed Oct 22, 2023
1 parent 88504bf commit 403fb35
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions velox/exec/tests/TableWriteTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct TestParam {

CompressionKind compressionKind() const {
return static_cast<facebook::velox::common::CompressionKind>(
(value & ((1L << 48) - 1)) >> 40);
(value & ((1L << 56) - 1)) >> 48);
}

bool multiDrivers() const {
Expand Down Expand Up @@ -167,13 +167,14 @@ struct TestParam {

std::string toString() const {
return fmt::format(
"FileFormat[{}] TestMode[{}] commitStrategy[{}] bucketKind[{}] bucketSort[{}] multiDrivers[{}]",
"FileFormat[{}] TestMode[{}] commitStrategy[{}] bucketKind[{}] bucketSort[{}] multiDrivers[{}] compression[{}]",
fileFormat(),
testMode(),
commitStrategy(),
bucketKind(),
bucketSort(),
multiDrivers());
multiDrivers(),
compressionKindToString(compressionKind()));
}
};

Expand Down

0 comments on commit 403fb35

Please sign in to comment.