Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2410,6 +2410,10 @@ void to_json(json& j, const std::shared_ptr<ExecutionWriterTarget>& p) {
j = *std::static_pointer_cast<CreateHandle>(p);
return;
}
if (type == "RefreshMaterializedViewHandle") {
j = *std::static_pointer_cast<InsertHandle>(p);
return;
}
if (type == "InsertHandle") {
j = *std::static_pointer_cast<InsertHandle>(p);
return;
Expand All @@ -2418,10 +2422,6 @@ void to_json(json& j, const std::shared_ptr<ExecutionWriterTarget>& p) {
j = *std::static_pointer_cast<DeleteHandle>(p);
return;
}
if (type == "RefreshMaterializedViewHandle") {
j = *std::static_pointer_cast<RefreshMaterializedViewHandle>(p);
return;
}

throw TypeError(type + " no abstract type ExecutionWriterTarget ");
}
Expand All @@ -2442,21 +2442,20 @@ void from_json(const json& j, std::shared_ptr<ExecutionWriterTarget>& p) {
p = std::static_pointer_cast<ExecutionWriterTarget>(k);
return;
}
if (type == "InsertHandle") {
if (type == "RefreshMaterializedViewHandle") {
std::shared_ptr<InsertHandle> k = std::make_shared<InsertHandle>();
j.get_to(*k);
p = std::static_pointer_cast<ExecutionWriterTarget>(k);
return;
}
if (type == "DeleteHandle") {
std::shared_ptr<DeleteHandle> k = std::make_shared<DeleteHandle>();
if (type == "InsertHandle") {
std::shared_ptr<InsertHandle> k = std::make_shared<InsertHandle>();
j.get_to(*k);
p = std::static_pointer_cast<ExecutionWriterTarget>(k);
return;
}
if (type == "RefreshMaterializedViewHandle") {
std::shared_ptr<RefreshMaterializedViewHandle> k =
std::make_shared<RefreshMaterializedViewHandle>();
if (type == "DeleteHandle") {
std::shared_ptr<DeleteHandle> k = std::make_shared<DeleteHandle>();
j.get_to(*k);
p = std::static_pointer_cast<ExecutionWriterTarget>(k);
return;
Expand Down Expand Up @@ -8461,13 +8460,9 @@ void from_json(const json& j, Range& p) {
}
} // namespace facebook::presto::protocol
namespace facebook::presto::protocol {
RefreshMaterializedViewHandle::RefreshMaterializedViewHandle() noexcept {
_type = "RefreshMaterializedViewHandle";
}

void to_json(json& j, const RefreshMaterializedViewHandle& p) {
j = json::object();
j["@type"] = "RefreshMaterializedViewHandle";
to_json_key(
j,
"handle",
Expand All @@ -8485,7 +8480,6 @@ void to_json(json& j, const RefreshMaterializedViewHandle& p) {
}

void from_json(const json& j, RefreshMaterializedViewHandle& p) {
p._type = j["@type"];
from_json_key(
j,
"handle",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1948,11 +1948,9 @@ void to_json(json& j, const Range& p);
void from_json(const json& j, Range& p);
} // namespace facebook::presto::protocol
namespace facebook::presto::protocol {
struct RefreshMaterializedViewHandle : public ExecutionWriterTarget {
struct RefreshMaterializedViewHandle {
InsertTableHandle handle = {};
SchemaTableName schemaTableName = {};

RefreshMaterializedViewHandle() noexcept;
};
void to_json(json& j, const RefreshMaterializedViewHandle& p);
void from_json(const json& j, RefreshMaterializedViewHandle& p);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ AbstractClasses:
ExecutionWriterTarget:
super: JsonEncodedSubclass
subclasses:
- { name: CreateHandle, key: CreateHandle }
- { name: InsertHandle, key: InsertHandle }
- { name: DeleteHandle, key: DeleteHandle }
- { name: RefreshMaterializedViewHandle, key: RefreshMaterializedViewHandle }
- { name: CreateHandle, key: CreateHandle }
- { name: InsertHandle, key: RefreshMaterializedViewHandle }
- { name: InsertHandle, key: InsertHandle }
- { name: DeleteHandle, key: DeleteHandle }


InputDistribution:
super: JsonEncodedSubclass
Expand Down
Loading