egolearner commented on code in PR #47200:
URL: https://github.com/apache/arrow/pull/47200#discussion_r2239446231
##########
cpp/src/arrow/io/hdfs_test.cc:
##########
@@ -36,14 +38,27 @@
#include "arrow/testing/gtest_util.h"
#include "arrow/testing/util.h"
-// boost/filesystem.hpp should be included after
-// arrow/util/windows_compatibility.h because boost/filesystem.hpp
-// includes windows.h implicitly.
-#include <boost/filesystem.hpp> // NOLINT
-
namespace arrow {
namespace io {
+std::string RandomPath(const std::string& prefix, int rand_length) {
+ static const char charset[] =
+ "0123456789"
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz";
+ std::string result = prefix;
+ result.reserve(prefix.size() + rand_length);
+
+ std::mt19937 rng(static_cast<unsigned>(std::time(nullptr)));
+ std::uniform_int_distribution<> dist(0, sizeof(charset) - 2);
Review Comment:
Sure. `random_alnum` added in `arrow/testing/util.{c,h}`.
PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]