diff --git a/bolt/connectors/hive/HiveDataSink.cpp b/bolt/connectors/hive/HiveDataSink.cpp index d77d16837..6ac56639a 100644 --- a/bolt/connectors/hive/HiveDataSink.cpp +++ b/bolt/connectors/hive/HiveDataSink.cpp @@ -938,10 +938,11 @@ std::string HiveInsertTableHandle::toString() const { std::string LocationHandle::toString() const { return fmt::format( - "LocationHandle [targetPath: {}, writePath: {}, tableType: {},", + "LocationHandle [targetPath: {}, writePath: {}, tableType: {}, tableFileName: {}]", targetPath_, writePath_, - tableTypeName(tableType_)); + tableTypeName(tableType_), + targetFileName_); } void LocationHandle::registerSerDe() { @@ -955,6 +956,7 @@ folly::dynamic LocationHandle::serialize() const { obj["targetPath"] = targetPath_; obj["writePath"] = writePath_; obj["tableType"] = tableTypeName(tableType_); + obj["targetFileName"] = targetFileName_; return obj; } @@ -962,7 +964,9 @@ LocationHandlePtr LocationHandle::create(const folly::dynamic& obj) { auto targetPath = obj["targetPath"].asString(); auto writePath = obj["writePath"].asString(); auto tableType = tableTypeFromName(obj["tableType"].asString()); - return std::make_shared(targetPath, writePath, tableType); + auto targetFileName = obj["targetFileName"].asString(); + return std::make_shared( + targetPath, writePath, tableType, targetFileName); } std::unique_ptr HiveDataSink::WriterReclaimer::create(