[Refactor](exec) Remove the unless header of vresult_writer (#22011)
Remove unless code of vresult_wirter;
This commit is contained in:
@ -29,10 +29,10 @@
|
||||
#include "common/status.h"
|
||||
#include "io/fs/file_writer.h"
|
||||
#include "runtime/descriptors.h"
|
||||
#include "runtime/result_writer.h"
|
||||
#include "util/runtime_profile.h"
|
||||
#include "vec/core/block.h"
|
||||
#include "vec/runtime/vparquet_writer.h"
|
||||
#include "vec/sink/vresult_writer.h"
|
||||
|
||||
namespace doris {
|
||||
class BufferControlBlock;
|
||||
@ -47,7 +47,7 @@ struct ResultFileOptions;
|
||||
namespace doris::vectorized {
|
||||
|
||||
// write result to file
|
||||
class VFileResultWriter final : public VResultWriter {
|
||||
class VFileResultWriter final : public ResultWriter {
|
||||
public:
|
||||
VFileResultWriter(const ResultFileOptions* file_option,
|
||||
const TStorageBackendType::type storage_type,
|
||||
|
||||
@ -77,7 +77,7 @@ template <bool is_binary_format>
|
||||
VMysqlResultWriter<is_binary_format>::VMysqlResultWriter(BufferControlBlock* sinker,
|
||||
const VExprContextSPtrs& output_vexpr_ctxs,
|
||||
RuntimeProfile* parent_profile)
|
||||
: VResultWriter(),
|
||||
: ResultWriter(),
|
||||
_sinker(sinker),
|
||||
_output_vexpr_ctxs(output_vexpr_ctxs),
|
||||
_parent_profile(parent_profile) {}
|
||||
|
||||
@ -24,11 +24,11 @@
|
||||
|
||||
#include "common/status.h"
|
||||
#include "runtime/define_primitive_type.h"
|
||||
#include "runtime/result_writer.h"
|
||||
#include "util/mysql_row_buffer.h"
|
||||
#include "util/runtime_profile.h"
|
||||
#include "vec/data_types/data_type.h"
|
||||
#include "vec/exprs/vexpr_fwd.h"
|
||||
#include "vec/sink/vresult_writer.h"
|
||||
|
||||
namespace doris {
|
||||
class BufferControlBlock;
|
||||
@ -38,7 +38,7 @@ namespace vectorized {
|
||||
class Block;
|
||||
|
||||
template <bool is_binary_format = false>
|
||||
class VMysqlResultWriter final : public VResultWriter {
|
||||
class VMysqlResultWriter final : public ResultWriter {
|
||||
public:
|
||||
using ResultList = std::vector<std::unique_ptr<TFetchDataResult>>;
|
||||
|
||||
|
||||
@ -37,7 +37,6 @@
|
||||
#include "util/uid_util.h"
|
||||
#include "vec/exprs/vexpr.h"
|
||||
#include "vec/runtime/vfile_result_writer.h"
|
||||
#include "vec/sink/vresult_writer.h"
|
||||
|
||||
namespace doris {
|
||||
class QueryStatistics;
|
||||
|
||||
@ -42,7 +42,6 @@ class TPlanFragmentDestination;
|
||||
class TResultFileSink;
|
||||
|
||||
namespace vectorized {
|
||||
class VResultWriter;
|
||||
class VExprContext;
|
||||
|
||||
class VResultFileSink : public DataSink {
|
||||
@ -84,7 +83,7 @@ private:
|
||||
std::unique_ptr<Block> _output_block = nullptr;
|
||||
std::shared_ptr<BufferControlBlock> _sender;
|
||||
std::unique_ptr<VDataStreamSender> _stream_sender;
|
||||
std::shared_ptr<VResultWriter> _writer;
|
||||
std::shared_ptr<ResultWriter> _writer;
|
||||
int _buf_size = 1024; // Allocated from _pool
|
||||
bool _is_top_sink = true;
|
||||
std::string _header;
|
||||
|
||||
@ -38,7 +38,6 @@
|
||||
#include "vec/exprs/vexpr.h"
|
||||
#include "vec/exprs/vexpr_context.h"
|
||||
#include "vec/sink/vmysql_result_writer.h"
|
||||
#include "vec/sink/vresult_writer.h"
|
||||
|
||||
namespace doris {
|
||||
class QueryStatistics;
|
||||
|
||||
@ -29,13 +29,13 @@
|
||||
#include "common/status.h"
|
||||
#include "exec/data_sink.h"
|
||||
#include "vec/exprs/vexpr_fwd.h"
|
||||
#include "vec/sink/vresult_writer.h"
|
||||
|
||||
namespace doris {
|
||||
class RuntimeState;
|
||||
class RuntimeProfile;
|
||||
class BufferControlBlock;
|
||||
class QueryStatistics;
|
||||
class ResultWriter;
|
||||
class RowDescriptor;
|
||||
class TExpr;
|
||||
|
||||
@ -44,7 +44,6 @@ class ResultSinkOperator;
|
||||
}
|
||||
namespace vectorized {
|
||||
class Block;
|
||||
class VResultWriter;
|
||||
|
||||
struct ResultFileOptions {
|
||||
// [[deprecated]]
|
||||
@ -155,7 +154,7 @@ private:
|
||||
VExprContextSPtrs _output_vexpr_ctxs;
|
||||
|
||||
std::shared_ptr<BufferControlBlock> _sender;
|
||||
std::shared_ptr<VResultWriter> _writer;
|
||||
std::shared_ptr<ResultWriter> _writer;
|
||||
RuntimeProfile* _profile; // Allocated from _pool
|
||||
int _buf_size; // Allocated from _pool
|
||||
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "runtime/result_writer.h"
|
||||
|
||||
namespace doris {
|
||||
namespace vectorized {
|
||||
|
||||
class Block;
|
||||
|
||||
class VResultWriter : public ResultWriter {
|
||||
public:
|
||||
VResultWriter() : ResultWriter() {}
|
||||
|
||||
virtual Status append_block(Block& block) = 0;
|
||||
|
||||
virtual bool can_sink() { return true; }
|
||||
};
|
||||
} // namespace vectorized
|
||||
} // namespace doris
|
||||
Reference in New Issue
Block a user