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
18 changes: 9 additions & 9 deletions be/src/pipeline/exec/result_sink_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ Status ResultSinkLocalState::init(RuntimeState* state, LocalSinkStateInfo& info)
_sender = _parent->cast<ResultSinkOperatorX>()._sender;
} else {
std::shared_ptr<arrow::Schema> arrow_schema;
if (p._sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCAL) {
if (p._sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCOL) {
RETURN_IF_ERROR(get_arrow_schema_from_expr_ctxs(_output_vexpr_ctxs, &arrow_schema,
state->timezone()));
}
VLOG_DEBUG << "create sender in INIT with instance id " << fragment_instance_id;
RETURN_IF_ERROR(state->exec_env()->result_mgr()->create_sender(
fragment_instance_id, p._result_sink_buffer_size_rows, &_sender, state,
p._sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCAL, arrow_schema));
p._sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCOL, arrow_schema));
}
_sender->set_dependency(fragment_instance_id, _dependency->shared_from_this());
return Status::OK();
Expand All @@ -76,7 +76,7 @@ Status ResultSinkLocalState::open(RuntimeState* state) {
auto& p = _parent->cast<ResultSinkOperatorX>();
// create writer based on sink type
switch (p._sink_type) {
case TResultSinkType::MYSQL_PROTOCAL: {
case TResultSinkType::MYSQL_PROTOCOL: {
if (state->mysql_row_binary_format()) {
_writer.reset(new (std::nothrow) vectorized::VMysqlResultWriter<true>(
_sender, _output_vexpr_ctxs, custom_profile()));
Expand All @@ -86,7 +86,7 @@ Status ResultSinkLocalState::open(RuntimeState* state) {
}
break;
}
case TResultSinkType::ARROW_FLIGHT_PROTOCAL: {
case TResultSinkType::ARROW_FLIGHT_PROTOCOL: {
_writer.reset(new (std::nothrow) vectorized::VArrowFlightResultWriter(
_sender, _output_vexpr_ctxs, custom_profile()));
break;
Expand All @@ -104,10 +104,10 @@ ResultSinkOperatorX::ResultSinkOperatorX(int operator_id, const RowDescriptor& r
const TResultSink& sink)
: DataSinkOperatorX(operator_id, std::numeric_limits<int>::max(),
std::numeric_limits<int>::max()),
_sink_type(!sink.__isset.type || sink.type == TResultSinkType::MYSQL_PROTOCAL
? TResultSinkType::MYSQL_PROTOCAL
_sink_type(!sink.__isset.type || sink.type == TResultSinkType::MYSQL_PROTOCOL
? TResultSinkType::MYSQL_PROTOCOL
: sink.type),
_result_sink_buffer_size_rows(_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCAL
_result_sink_buffer_size_rows(_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCOL
? config::arrow_flight_result_sink_buffer_size_rows
: RESULT_SINK_BUFFER_SIZE),
_row_desc(row_desc),
Expand All @@ -132,14 +132,14 @@ Status ResultSinkOperatorX::prepare(RuntimeState* state) {

if (state->query_options().enable_parallel_result_sink) {
std::shared_ptr<arrow::Schema> arrow_schema;
if (_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCAL) {
if (_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCOL) {
RETURN_IF_ERROR(get_arrow_schema_from_expr_ctxs(_output_vexpr_ctxs, &arrow_schema,
state->timezone()));
}
VLOG_DEBUG << "create sender in prepare with query id " << state->query_id();
RETURN_IF_ERROR(state->exec_env()->result_mgr()->create_sender(
state->query_id(), _result_sink_buffer_size_rows, &_sender, state,
_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCAL, arrow_schema));
_sink_type == TResultSinkType::ARROW_FLIGHT_PROTOCOL, arrow_schema));
}
return vectorized::VExpr::open(_output_vexpr_ctxs, state);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public MysqlChannel(StreamConnection connection, ConnectContext context) {
this.remoteIp = "";
this.conn = connection;

// if proxy protocal is enabled, the remote address will be got from proxy protocal header
// if proxy protocol is enabled, the remote address will be got from proxy protocol header
// and overwrite the original remote address.
if (connection.getPeerAddress() instanceof InetSocketAddress) {
InetSocketAddress address = (InetSocketAddress) connection.getPeerAddress();
Expand Down Expand Up @@ -638,7 +638,7 @@ private boolean handleUnwrapResult(SSLEngineResult sslEngineResult) {
}
}

// for proxy protocal only
// for proxy protocol only
public void setRemoteAddr(String ip, int port) {
this.remoteIp = ip;
this.remoteHostPortString = NetUtils.getHostPortInAccessibleFormat(ip, port);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public class PlanFragment extends TreeNode<PlanFragment> {
protected boolean hasColocatePlanNode = false;
protected final Supplier<Boolean> hasBucketShuffleJoin;

private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL;
private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCOL;

public Optional<NereidsSpecifyInstances<ScanSource>> specifyInstances = Optional.empty();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class ResultSink extends DataSink {
// Two phase fetch option
private TFetchOption fetchOption;

private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL;
private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCOL;

public ResultSink(PlanNodeId exchNodeId) {
this.exchNodeId = exchNodeId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public enum ConnectType {
private String workloadGroupName = "";
private boolean isGroupCommit;

private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCAL;
private TResultSinkType resultSinkType = TResultSinkType.MYSQL_PROTOCOL;

private Map<String, Set<String>> dbToTempTableNamesMap = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public FlightSqlConnectContext(String peerIdentity) {
this.peerIdentity = peerIdentity;
mysqlChannel = null; // Use of MysqlChannel is not expected
flightSqlChannel = new FlightSqlChannel();
setResultSinkType(TResultSinkType.ARROW_FLIGHT_PROTOCAL);
setResultSinkType(TResultSinkType.ARROW_FLIGHT_PROTOCOL);
init();
}

Expand Down
4 changes: 2 additions & 2 deletions gensrc/thrift/DataSinks.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ enum TDataSinkType {
}

enum TResultSinkType {
MYSQL_PROTOCAL = 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

every field in thrift has an ID. You can change the name. It is compatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been verified to be true, thanks~, I will update it later.

ARROW_FLIGHT_PROTOCAL = 1,
MYSQL_PROTOCOL = 0,
ARROW_FLIGHT_PROTOCOL = 1,
FILE = 2, // deprecated, should not be used any more. FileResultSink is covered by TRESULT_FILE_SINK for concurrent purpose.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ suite("push_topn_to_agg") {
| HAS_COLO_PLAN_NODE: false |
| |
| VRESULT SINK |
| MYSQL_PROTOCAL |
| MYSQL_PROTOCOL |
| |
| 4:VEXCHANGE |
| offset: 0 |
Expand Down
2 changes: 1 addition & 1 deletion samples/datalake/lakesoul/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mysql> explain verbose select * from customer_from_spark where c_nationkey < 3;
| HAS_COLO_PLAN_NODE: false |
| |
| VRESULT SINK |
| MYSQL_PROTOCAL |
| MYSQL_PROTOCOL |
| |
| 1:VEXCHANGE |
| offset: 0 |
Expand Down
Loading