File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/Storages/ObjectStorage Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,23 @@ namespace DB
4747 using ObjectStorageFilePathGenerator::getPathForWrite; // Bring base class overloads into scope
4848 std::string getPathForWrite (const std::string & partition_id, const std::string & file_name_override) const override
4949 {
50+ std::string result;
51+
52+ result += raw_path;
53+
54+ if (raw_path.back () != ' /' )
55+ {
56+ result += " /" ;
57+ }
58+
59+ // / Not adding '/' because buildExpressionHive() always adds a trailing '/'
60+ result += partition_id;
61+
5062 const auto file_name = file_name_override.empty () ? std::to_string (generateSnowflakeID ()) : file_name_override;
51- return raw_path + " /" + partition_id + " /" + file_name + " ." + file_format;
63+
64+ result += file_name + " ." + file_format;
65+
66+ return result;
5267 }
5368
5469 std::string getPathForRead () const override
You can’t perform that action at this time.
0 commit comments