Skip to content

Commit

Permalink
[native] Advance velox version and update temp file access code
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxmeng committed Apr 17, 2024
1 parent 23f43a8 commit d33246d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace facebook::presto::test {

void setupMutableSystemConfig() {
auto dir = exec::test::TempDirectoryPath::create();
auto sysConfigFilePath = fmt::format("{}/config.properties", dir->path);
auto sysConfigFilePath = fmt::format("{}/config.properties", dir->getPath());
auto fileSystem = filesystems::getFileSystem(sysConfigFilePath, nullptr);
auto sysConfigFile = fileSystem->openFileForWrite(sysConfigFilePath);
sysConfigFile->append(fmt::format("{}=true\n", ConfigBase::kMutableConfig));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ TEST_F(RemoteFunctionRegistererTest, directory) {
// $ tmpDir/subdir/remote3.json
//
// to ensure files can be read recursively.
writeToFile(tempDir->path + "/remote1.json", getJson("mock1"));
writeToFile(tempDir->path + "/remote2.json", getJson("mock2"));
writeToFile(tempDir->getPath() + "/remote1.json", getJson("mock1"));
writeToFile(tempDir->getPath() + "/remote2.json", getJson("mock2"));

const std::string tempSubdir = tempDir->path + "/subdir";
const std::string tempSubdir = tempDir->getPath() + "/subdir";
fs::create_directory(tempSubdir);
writeToFile(tempSubdir + "/remote3.json", getJson("mock3"));

EXPECT_EQ(registerRemoteFunctions(tempDir->path, {}), 3);
EXPECT_EQ(registerRemoteFunctions(tempDir->getPath(), {}), 3);
}

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1489,9 +1489,9 @@ TEST_F(TaskManagerTest, buildSpillDirectoryFailure) {
if (buildSpillDirectoryFailure) {
// Set bad formatted spill path.
taskManager_->setBaseSpillDirectory(
fmt::format("/etc/{}", spillDir->path));
fmt::format("/etc/{}", spillDir->getPath()));
} else {
taskManager_->setBaseSpillDirectory(spillDir->path);
taskManager_->setBaseSpillDirectory(spillDir->getPath());
}

std::map<std::string, std::string> queryConfigs;
Expand Down
2 changes: 1 addition & 1 deletion presto-native-execution/velox
Submodule velox updated 285 files

0 comments on commit d33246d

Please sign in to comment.