Skip to content

Commit

Permalink
Fix flaky test HiveConnectorSerDeTest (#11194)
Browse files Browse the repository at this point in the history
Summary:
The test compares unordered maps from a direct toString() without ordering, creating flakiness. The fix sorts the map before printing.

Pull Request resolved: #11194

Reviewed By: xiaoxmeng, kagamiori

Differential Revision: D64016907

Pulled By: tanjialiang

fbshipit-source-id: 4707d6855266355a8bd3472e596739c5b6cf1c4d
  • Loading branch information
tanjialiang authored and facebook-github-bot committed Oct 8, 2024
1 parent 640592d commit be2baba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion velox/connectors/hive/HiveDataSink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,10 @@ std::string HiveInsertTableHandle::toString() const {
}

if (serdeParameters_.size() > 0) {
std::map<std::string, std::string> sortedSerdeParams(
serdeParameters_.begin(), serdeParameters_.end());
out << ", serdeParameters: ";
for (const auto& [key, value] : serdeParameters_) {
for (const auto& [key, value] : sortedSerdeParams) {
out << "[" << key << ", " << value << "] ";
}
}
Expand Down

0 comments on commit be2baba

Please sign in to comment.