Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Scale Backends for connector sink when writing static partition tables #41564

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix
Signed-off-by: Jiao Mingye <[email protected]>
  • Loading branch information
mxdzs0612 committed Mar 7, 2024
commit 20ec4da892a502521961fece78c6ea1bd0672095
7 changes: 4 additions & 3 deletions be/test/exec/pipeline/exchange_sink_operator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ using ::testing::Return;
using ::testing::ByMove;
using ::testing::_;

TEST_F(ExchangeSinkOperatorTest, test_push_chunk) {
TEST_F(ExchangeSinkOperatorTest, test_push_random_scale) {
std::vector<TPlanFragmentDestination> destinations;
TPlanFragmentDestination destination;
destination.__set_fragment_instance_id(_fragment_context->fragment_instance_id());
Expand All @@ -92,13 +92,14 @@ TEST_F(ExchangeSinkOperatorTest, test_push_chunk) {
std::vector<int32_t> output_columns;
// auto mock_sink_buffer = std::make_shared<MockSinkBuffer>(_fragment_context, destinations, false);
auto mock_sink_buffer = std::make_shared<SinkBuffer>(_fragment_context, destinations, false);
ASSERT_EQ(mock_sink_buffer->connector_sink_need_scaling(0, 0), false);
ASSERT_EQ(mock_sink_buffer->connector_sink_need_scaling(0, 0), true);

PlanNodeId id = 2;
auto exchange_sink_operator_factory = std::make_shared<ExchangeSinkOperatorFactory>(
0, 2, std::move(mock_sink_buffer), TPartitionType::RANDOM_SCALE, destinations, false, 0, 0, id,
std::move(partition_expr_ctxs), false, false, _fragment_context, output_columns);
exchange_sink_operator_factory->set_runtime_state(_runtime_state);
auto exchange_sink_operator = exchange_sink_operator_factory->create(0, 0);
auto exchange_sink_operator = exchange_sink_operator_factory->create(1, 0);
auto chunk = std::make_shared<Chunk>();
EXPECT_OK(exchange_sink_operator->push_chunk(_runtime_state, chunk));
}
Expand Down