Skip to content

Revert "Always use EvWrite" #16341

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

Merged
merged 1 commit into from
Mar 27, 2025
Merged
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
20 changes: 9 additions & 11 deletions ydb/core/kqp/opt/kqp_query_plan.cpp
Original file line number Diff line number Diff line change
@@ -839,17 +839,15 @@ class TxPlanSerializer {
op.Properties["Table"] = tableData.RelativePath ? *tableData.RelativePath : tablePath;
op.Properties["Path"] = tablePath;

if (writeInfo.Type != EPlanTableWriteType::MultiErase) {
const auto& tupleType = stage.Ref().GetTypeAnn()->Cast<TTupleExprType>();
YQL_ENSURE(tupleType);
YQL_ENSURE(tupleType->GetSize() == 1);
const auto& listType = tupleType->GetItems()[0]->Cast<TListExprType>();
YQL_ENSURE(listType);
const auto& structType = listType->GetItemType()->Cast<TStructExprType>();
YQL_ENSURE(structType);
for (const auto& item : structType->GetItems()) {
writeInfo.Columns.push_back(TString(item->GetName()));
}
const auto& tupleType = stage.Ref().GetTypeAnn()->Cast<TTupleExprType>();
YQL_ENSURE(tupleType);
YQL_ENSURE(tupleType->GetSize() == 1);
const auto& listType = tupleType->GetItems()[0]->Cast<TListExprType>();
YQL_ENSURE(listType);
const auto& structType = listType->GetItemType()->Cast<TStructExprType>();
YQL_ENSURE(structType);
for (const auto& item : structType->GetItems()) {
writeInfo.Columns.push_back(TString(item->GetName()));
}

SerializerCtx.Tables[tablePath].Writes.push_back(writeInfo);
9 changes: 2 additions & 7 deletions ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
Original file line number Diff line number Diff line change
@@ -9981,10 +9981,9 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
);
}

Y_UNIT_TEST_TWIN(DoubleCreateResourcePoolClassifier, UseSink) {
Y_UNIT_TEST(DoubleCreateResourcePoolClassifier) {
NKikimrConfig::TAppConfig config;
config.MutableFeatureFlags()->SetEnableResourcePools(true);
config.MutableTableServiceConfig()->SetEnableOltpSink(UseSink);

TKikimrRunner kikimr(NKqp::TKikimrSettings()
.SetAppConfig(config)
@@ -10011,11 +10010,7 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
);)";
auto result = session.ExecuteSchemeQuery(query).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), EStatus::GENERIC_ERROR);
if (UseSink) {
UNIT_ASSERT_STRING_CONTAINS_C(result.GetIssues().ToString(), "Duplicate keys have been found", result.GetIssues().ToString());
} else {
UNIT_ASSERT_STRING_CONTAINS_C(result.GetIssues().ToString(), "Conflict with existing key", result.GetIssues().ToString());
}
UNIT_ASSERT_STRING_CONTAINS_C(result.GetIssues().ToString(), "Conflict with existing key", result.GetIssues().ToString());
}
}

2 changes: 1 addition & 1 deletion ydb/core/protos/table_service_config.proto
Original file line number Diff line number Diff line change
@@ -293,7 +293,7 @@ message TTableServiceConfig {
optional uint64 IdxLookupJoinPointsLimit = 58 [default = 3];
reserved 59; //optional bool OldLookupJoinBehaviour = 59 [default = false];

optional bool EnableOltpSink = 60 [default = true];
optional bool EnableOltpSink = 60 [default = false];

enum EBlockChannelsMode {
BLOCK_CHANNELS_SCALAR = 0;
2 changes: 1 addition & 1 deletion ydb/core/tx/datashard/check_write_unit.cpp
Original file line number Diff line number Diff line change
@@ -115,7 +115,7 @@ EExecutionStatus TCheckWriteUnit::Execute(TOperation::TPtr op,
if (!Pipeline.AssignPlanInterval(op)) {
TString err = TStringBuilder() << "Can't propose tx " << op->GetTxId() << " at blocked shard " << DataShard.TabletID();

writeOp->SetError(NKikimrDataEvents::TEvWriteResult::STATUS_OVERLOADED, err);
writeOp->SetError(NKikimrDataEvents::TEvWriteResult::STATUS_INTERNAL_ERROR, err);
op->Abort(EExecutionUnitKind::FinishProposeWrite);

LOG_NOTICE_S(ctx, NKikimrServices::TX_DATASHARD, err);
2 changes: 1 addition & 1 deletion ydb/services/persqueue_v1/ut/topic_service_ut.cpp
Original file line number Diff line number Diff line change
@@ -412,7 +412,7 @@ Y_UNIT_TEST_F(MultiplePartitionsAndNoGapsInTheOffsets, TUpdateOffsetsInTransacti
auto result = tx->Commit().ExtractValueSync();
Cerr << ">>> CommitTx >>>" << Endl;
UNIT_ASSERT_EQUAL(result.IsTransportError(), false);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), NYdb::EStatus::BAD_REQUEST);
UNIT_ASSERT_VALUES_EQUAL(result.GetStatus(), NYdb::EStatus::ABORTED);
}

}
27 changes: 19 additions & 8 deletions ydb/services/ydb/ydb_table_ut.cpp
Original file line number Diff line number Diff line change
@@ -2913,12 +2913,12 @@ R"___(<main>: Error: Transaction not found: , code: 2015
} else {
// Cerr << "\nQUERY: " << query << "\nSTATS:\n" << result.GetStats()->ToString() << Endl;
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).name(), "/Root/Foo");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(0).table_access(0).updates().rows(), 2);
UNIT_ASSERT(stats.query_phases(0).table_access(0).updates().bytes() > 1);
UNIT_ASSERT(stats.query_phases(0).cpu_time_us() > 0);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 2);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).name(), "/Root/Foo");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(1).table_access(0).updates().rows(), 2);
UNIT_ASSERT(stats.query_phases(1).table_access(0).updates().bytes() > 1);
UNIT_ASSERT(stats.query_phases(1).cpu_time_us() > 0);
UNIT_ASSERT(stats.total_duration_us() > 0);
}
}
@@ -2978,13 +2978,24 @@ R"___(<main>: Error: Transaction not found: , code: 2015
auto& stats = NYdb::TProtoAccessor::GetProto(*result.GetStats());

int idx = 0;
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 1);
if (stats.query_phases().size() == 2) {
idx = 0;
} else {
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases().size(), 3);
UNIT_ASSERT(stats.query_phases(0).table_access().empty());
idx = 1;
}

// 1st phase: find matching rows
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx).table_access(0).name(), "/Root/Foo");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx).table_access(0).reads().rows(), 2);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx).table_access(0).deletes().rows(), 2);
UNIT_ASSERT(stats.query_phases(idx).cpu_time_us() > 0);
// 2nd phase: delete found rows
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx + 1).table_access().size(), 1);
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx + 1).table_access(0).name(), "/Root/Foo");
UNIT_ASSERT_VALUES_EQUAL(stats.query_phases(idx + 1).table_access(0).deletes().rows(), 2);
UNIT_ASSERT(stats.query_phases(idx + 1).cpu_time_us() > 0);
UNIT_ASSERT(stats.total_duration_us() > 0);
}
}
2 changes: 1 addition & 1 deletion ydb/tests/functional/api/test_insert.py
Original file line number Diff line number Diff line change
@@ -191,7 +191,7 @@ def callee():
callee,
raises(
ydb.PreconditionFailed,
"Duplicate keys have been found."
"Conflict with existing key."
)
)

2 changes: 0 additions & 2 deletions ydb/tests/functional/api/test_isolation.py
Original file line number Diff line number Diff line change
@@ -650,8 +650,6 @@ def test_anti_dependency_cycles_g2_two_edges(self):

def callee():
t1.execute('{} update {} set value = 0 where id = 1;'.format(prefix, table_name))
# Sinks allow UPDATE statement to be delayed, so we do commit here to execute update.
t1.commit()

assert_that(
callee,
1 change: 0 additions & 1 deletion ydb/tests/functional/api/ya.make
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ FORK_TEST_FILES()
SIZE(MEDIUM)

ENV(YDB_DRIVER_BINARY="ydb/apps/ydbd/ydbd")
ENV(YDB_HARD_MEMORY_LIMIT_BYTES="8000000000")

TEST_SRCS(
test_session_pool.py
Original file line number Diff line number Diff line change
@@ -21,13 +21,21 @@
},
{
"name": "/local/base_dynumber_insert_from_table_sql_plan/ResultTableDyNumber",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -6,13 +6,21 @@
"tables": [
{
"name": "/local/base_dynumber_insert_literal_sql_plan/ResultLiteralDyNumber",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -6,13 +6,21 @@
"tables": [
{
"name": "/local/base_dynumber_insert_params_sql_plan/ResultParamsDyNumber",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -519,23 +519,27 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"Node Type": "Effect",
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{Key: 3,Value: \"Three\"},{Key: 4,Value: \"Four\"}]",
"Name": "Iterator"
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_explain_script_script/ScriptingTest",
"Table": "base_explain_script_script/ScriptingTest"
},
{
"Inputs": [],
"Name": "Replace",
"Path": "/local/base_explain_script_script/ScriptingTest",
"SinkType": "KqpTableSink",
"Table": "base_explain_script_script/ScriptingTest"
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
@@ -559,7 +563,7 @@
"Key",
"Value"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
}
@@ -571,23 +575,27 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"Node Type": "Effect",
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{Key: 1,Value: \"One\"},{Key: 2,Value: \"Two\"}]",
"Name": "Iterator"
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_explain_script_script/ScriptingTest",
"Table": "base_explain_script_script/ScriptingTest"
},
{
"Inputs": [],
"Name": "Replace",
"Path": "/local/base_explain_script_script/ScriptingTest",
"SinkType": "KqpTableSink",
"Table": "base_explain_script_script/ScriptingTest"
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
@@ -611,7 +619,7 @@
"Key",
"Value"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -294,23 +294,27 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"Node Type": "Effect",
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{Group: 1,Value: \"One\"},{Group: 3,Value: \"Three\"}]",
"Name": "Iterator"
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_join_group_by_lookup_script_script/Temp",
"Table": "base_join_group_by_lookup_script_script/Temp"
},
{
"Inputs": [],
"Name": "Replace",
"Path": "/local/base_join_group_by_lookup_script_script/Temp",
"SinkType": "KqpTableSink",
"Table": "base_join_group_by_lookup_script_script/Temp"
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
@@ -334,7 +338,7 @@
"Group",
"Value"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -21,13 +21,21 @@
},
{
"name": "/local/base_json_insert_from_table_sql_plan/ResultTableJD",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -6,13 +6,21 @@
"tables": [
{
"name": "/local/base_json_insert_literal_sql_plan/ResultLiteralJD",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -6,13 +6,21 @@
"tables": [
{
"name": "/local/base_json_insert_params_sql_plan/ResultParamsJD",
"reads": [
{
"lookup_by": [
"Key"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"Key",
"Value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -10,23 +10,27 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"Node Type": "Effect",
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{idx: 1,text: \"to do or not to do\"}]",
"Name": "Iterator"
},
{
"Inputs": [],
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_simple_ct_script_script/Questions",
"SinkType": "KqpTableSink",
"Table": "base_simple_ct_script_script/Questions"
},
{
"Inputs": [],
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
Original file line number Diff line number Diff line change
@@ -135,23 +135,27 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"Node Type": "Effect",
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{Key: \"Key\",Value01: \"true\",Value02: 1,Value03: -1,Value04: 2,Value05: -2,Value06: 3,Value07: \"4.5\",Value08: Minus,Value09: \"3.14\",Value10: DyNumber,Value21: \"\\u041F\\u0440\\u0438\\u0432\\u0435\\u0442\",Value22: \"{\\\"name\\\": \\\"George\\\", \\\"age\\\": 23}\",Value23: JsonDocument,Value24: \"{a=1; b=2}\",Value31: Apply,Value32: Apply,Value33: Apply,Value34: Apply}]",
"Name": "Iterator"
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_table_types_script_script/TableTypes",
"Table": "base_table_types_script_script/TableTypes"
},
{
"Inputs": [],
"Name": "Replace",
"Path": "/local/base_table_types_script_script/TableTypes",
"SinkType": "KqpTableSink",
"Table": "base_table_types_script_script/TableTypes"
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
@@ -192,7 +196,7 @@
"Value33",
"Value34"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -6,14 +6,23 @@
"tables": [
{
"name": "/local/base_write_insert_sql_plan/Input",
"reads": [
{
"lookup_by": [
"key",
"subkey"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"key",
"subkey",
"value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
},
@@ -32,6 +41,13 @@
"Name (-\u221e, +\u221e)"
],
"type": "Scan"
},
{
"lookup_by": [
"Group",
"Name"
],
"type": "Lookup"
}
],
"writes": [
@@ -41,7 +57,7 @@
"Group",
"Name"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@
"subkey",
"value"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
},
@@ -44,7 +44,7 @@
"Group",
"Name"
],
"type": "MultiInsert"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -214,57 +214,98 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"PlanNodeId": 2,
"Node Type": "Effect",
"PlanNodeId": 12,
"Plans": [
{
"Node Type": "ConstantExpr-Sink",
"CTE Name": "precompute_0_1",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Iterator": "[{Group: 1,Name: ToString}]",
"Name": "Iterator"
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_write_multi_usage_script_script/Temp",
"Table": "base_write_multi_usage_script_script/Temp"
},
{
"Inputs": [],
"Name": "Delete",
"Path": "/local/base_write_multi_usage_script_script/Input1",
"SinkType": "KqpTableSink",
"Table": "base_write_multi_usage_script_script/Input1"
"Iterator": "precompute_0_1",
"Name": "Iterator"
}
],
"PlanNodeId": 1,
"PlanNodeId": 11,
"Tables": [
"base_write_multi_usage_script_script/Input1"
"base_write_multi_usage_script_script/Temp"
]
}
]
},
{
"Node Type": "Sink",
"PlanNodeId": 7,
"Node Type": "Effect",
"PlanNodeId": 10,
"Plans": [
{
"Node Type": "Stage-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Delete-ConstantExpr",
"Operators": [
{
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Delete",
"Path": "/local/base_write_multi_usage_script_script/Input1",
"Table": "base_write_multi_usage_script_script/Input1"
},
{
"Inputs": [],
"Name": "Upsert",
"Path": "/local/base_write_multi_usage_script_script/Temp",
"SinkType": "KqpTableSink",
"Table": "base_write_multi_usage_script_script/Temp"
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 6,
"PlanNodeId": 9,
"Tables": [
"base_write_multi_usage_script_script/Input1"
]
}
]
},
{
"Node Type": "Precompute_0_0",
"Parent Relationship": "InitPlan",
"PlanNodeId": 7,
"PlanNodeType": "Materialize",
"Plans": [
{
"Node Type": "Stage",
"PlanNodeId": 6
}
],
"Subplan Name": "CTE precompute_0_0"
},
{
"Node Type": "Precompute_0_1",
"Parent Relationship": "InitPlan",
"PlanNodeId": 5,
"PlanNodeType": "Materialize",
"Plans": [
{
"Node Type": "Collect",
"PlanNodeId": 4,
"Plans": [
{
"Node Type": "UnionAll",
"PlanNodeId": 5,
"PlanNodeId": 3,
"PlanNodeType": "Connection",
"Plans": [
{
"Node Type": "Stage",
"PlanNodeId": 4,
"PlanNodeId": 2,
"Plans": [
{
"Node Type": "TableRangeScan",
@@ -284,7 +325,7 @@
"Table": "base_write_multi_usage_script_script/Input1"
}
],
"PlanNodeId": 3,
"PlanNodeId": 1,
"Tables": [
"base_write_multi_usage_script_script/Input1"
]
@@ -293,12 +334,10 @@
}
]
}
],
"Tables": [
"base_write_multi_usage_script_script/Temp"
]
}
]
],
"Subplan Name": "CTE precompute_0_1"
}
],
"Stats": {
Original file line number Diff line number Diff line change
@@ -104,20 +104,44 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"PlanNodeId": 5,
"Node Type": "Effect",
"PlanNodeId": 8,
"Plans": [
{
"Node Type": "Stage-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_write_multi_usage_key_script_script/Temp",
"SinkType": "KqpTableSink",
"Table": "base_write_multi_usage_key_script_script/Temp"
},
{
"Inputs": [],
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 7,
"Tables": [
"base_write_multi_usage_key_script_script/Temp"
]
}
]
},
{
"Node Type": "Precompute_0",
"Parent Relationship": "InitPlan",
"PlanNodeId": 5,
"PlanNodeType": "Materialize",
"Plans": [
{
"Node Type": "Collect",
"PlanNodeId": 4,
"Plans": [
{
@@ -169,12 +193,10 @@
}
]
}
],
"Tables": [
"base_write_multi_usage_key_script_script/Temp"
]
}
]
],
"Subplan Name": "CTE precompute_0_0"
}
],
"Stats": {
Original file line number Diff line number Diff line change
@@ -9,26 +9,26 @@
"writes": [
{
"columns": [
"Amount",
"Comment",
"Group",
"Name"
],
"type": "MultiUpsert"
},
{
"type": "MultiErase"
},
{
"type": "MultiErase"
},
{
"columns": [
"Amount",
"Comment",
"Group",
"Name"
],
"type": "MultiReplace"
"type": "MultiUpsert"
},
{
"type": "MultiErase"
},
{
"type": "MultiErase"
}
]
}
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
"subkey",
"value"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
},
@@ -40,7 +40,7 @@
"Group",
"Name"
],
"type": "MultiReplace"
"type": "MultiUpsert"
},
{
"columns": [
@@ -49,7 +49,7 @@
"Group",
"Name"
],
"type": "MultiReplace"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@
{
"columns": [
"Amount",
"Group",
"Name"
"Name",
"Group"
],
"type": "MultiUpsert"
}
Original file line number Diff line number Diff line change
@@ -6,14 +6,27 @@
"tables": [
{
"name": "/local/base_write_update_on_sql_plan/Input",
"reads": [
{
"columns": [
"key",
"subkey"
],
"lookup_by": [
"key",
"subkey"
],
"type": "Lookup"
}
],
"writes": [
{
"columns": [
"key",
"subkey",
"value"
],
"type": "MultiUpdate"
"type": "MultiUpsert"
}
]
},
@@ -33,6 +46,17 @@
"Name (-\u221e, +\u221e)"
],
"type": "Scan"
},
{
"columns": [
"Group",
"Name"
],
"lookup_by": [
"Group",
"Name"
],
"type": "Lookup"
}
],
"writes": [
@@ -42,7 +66,7 @@
"Group",
"Name"
],
"type": "MultiUpdate"
"type": "MultiUpsert"
}
]
}
Original file line number Diff line number Diff line change
@@ -106,20 +106,44 @@
"PlanNodeType": "Query",
"Plans": [
{
"Node Type": "Sink",
"PlanNodeId": 7,
"Node Type": "Effect",
"PlanNodeId": 10,
"Plans": [
{
"Node Type": "Stage-Sink",
"CTE Name": "precompute_0_0",
"Node Type": "Upsert-ConstantExpr",
"Operators": [
{
"Inputs": [],
"Inputs": [
{
"InternalOperatorId": 1
}
],
"Name": "Upsert",
"Path": "/local/base_write_write_group_by_script_script/Temp",
"SinkType": "KqpTableSink",
"Table": "base_write_write_group_by_script_script/Temp"
},
{
"Inputs": [],
"Iterator": "precompute_0_0",
"Name": "Iterator"
}
],
"PlanNodeId": 9,
"Tables": [
"base_write_write_group_by_script_script/Temp"
]
}
]
},
{
"Node Type": "Precompute_0",
"Parent Relationship": "InitPlan",
"PlanNodeId": 7,
"PlanNodeType": "Materialize",
"Plans": [
{
"Node Type": "Collect",
"PlanNodeId": 6,
"Plans": [
{
@@ -200,12 +224,10 @@
}
]
}
],
"Tables": [
"base_write_write_group_by_script_script/Temp"
]
}
]
],
"Subplan Name": "CTE precompute_0_0"
}
],
"Stats": {