Skip to content

Commit 06d21b0

Browse files
committed
[native] Relevant changes of presto protocol for distributed procedure
1 parent 1ffa0aa commit 06d21b0

File tree

12 files changed

+1121
-522
lines changed

12 files changed

+1121
-522
lines changed

presto-main-base/src/main/java/com/facebook/presto/execution/scheduler/ExecutionWriterTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
@JsonSubTypes.Type(value = ExecutionWriterTarget.DeleteHandle.class, name = "DeleteHandle"),
3939
@JsonSubTypes.Type(value = ExecutionWriterTarget.RefreshMaterializedViewHandle.class, name = "RefreshMaterializedViewHandle"),
4040
@JsonSubTypes.Type(value = ExecutionWriterTarget.UpdateHandle.class, name = "UpdateHandle"),
41-
@JsonSubTypes.Type(value = ExecutionWriterTarget.ExecuteProcedureHandle.class, name = "TableExecuteHandle")
41+
@JsonSubTypes.Type(value = ExecutionWriterTarget.ExecuteProcedureHandle.class, name = "ExecuteProcedureHandle")
4242
})
4343
@SuppressWarnings({"EmptyClass", "ClassMayBeInterface"})
4444
public abstract class ExecutionWriterTarget

presto-native-execution/presto_cpp/presto_protocol/connector/hive/HiveConnectorProtocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ using HiveConnectorProtocol = ConnectorProtocolTemplate<
2626
HivePartitioningHandle,
2727
HiveTransactionHandle,
2828
NotImplemented,
29+
NotImplemented,
2930
NotImplemented>;
3031
} // namespace facebook::presto::protocol::hive

presto-native-execution/presto_cpp/presto_protocol/connector/iceberg/IcebergConnectorProtocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ using IcebergConnectorProtocol = ConnectorProtocolTemplate<
2828
NotImplemented,
2929
hive::HiveTransactionHandle,
3030
NotImplemented,
31+
NotImplemented,
3132
NotImplemented>;
3233

3334
} // namespace facebook::presto::protocol::iceberg

presto-native-execution/presto_cpp/presto_protocol/connector/tpch/TpchConnectorProtocol.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ using TpchConnectorProtocol = ConnectorProtocolTemplate<
2929
TpchPartitioningHandle,
3030
TpchTransactionHandle,
3131
NotImplemented,
32+
NotImplemented,
3233
NotImplemented>;
3334

3435
} // namespace facebook::presto::protocol::tpch

presto-native-execution/presto_cpp/presto_protocol/core/ConnectorProtocol.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ class ConnectorProtocol {
7575
const std::string& thrift,
7676
std::shared_ptr<ConnectorInsertTableHandle>& proto) const = 0;
7777

78+
virtual void to_json(
79+
json& j,
80+
const std::shared_ptr<ConnectorDistributedProcedureHandle>& p) const = 0;
81+
virtual void from_json(
82+
const json& j,
83+
std::shared_ptr<ConnectorDistributedProcedureHandle>& p) const = 0;
84+
7885
virtual void to_json(
7986
json& j,
8087
const std::shared_ptr<ConnectorOutputTableHandle>& p) const = 0;
@@ -152,6 +159,7 @@ template <
152159
typename ConnectorSplitType = NotImplemented,
153160
typename ConnectorPartitioningHandleType = NotImplemented,
154161
typename ConnectorTransactionHandleType = NotImplemented,
162+
typename ConnectorDistributedProcedureHandleType = NotImplemented,
155163
typename ConnectorDeleteTableHandleType = NotImplemented,
156164
typename ConnectorIndexHandleType = NotImplemented>
157165
class ConnectorProtocolTemplate final : public ConnectorProtocol {
@@ -220,6 +228,18 @@ class ConnectorProtocolTemplate final : public ConnectorProtocol {
220228
deserializeTemplate<ConnectorInsertTableHandleType>(thrift, proto);
221229
}
222230

231+
void to_json(
232+
json& j,
233+
const std::shared_ptr<ConnectorDistributedProcedureHandle>& p)
234+
const final {
235+
to_json_template<ConnectorDistributedProcedureHandleType>(j, p);
236+
}
237+
void from_json(
238+
const json& j,
239+
std::shared_ptr<ConnectorDistributedProcedureHandle>& p) const final {
240+
from_json_template<ConnectorDistributedProcedureHandleType>(j, p);
241+
}
242+
223243
void to_json(json& j, const std::shared_ptr<ConnectorOutputTableHandle>& p)
224244
const final {
225245
to_json_template<ConnectorOutputTableHandleType>(j, p);
@@ -403,6 +423,7 @@ using SystemConnectorProtocol = ConnectorProtocolTemplate<
403423
SystemPartitioningHandle,
404424
SystemTransactionHandle,
405425
NotImplemented,
426+
NotImplemented,
406427
NotImplemented>;
407428

408429
} // namespace facebook::presto::protocol

0 commit comments

Comments
 (0)