Skip to content

Commit 2c44b87

Browse files
authored
Always use EvWrite (#16841)
1 parent dc2c77f commit 2c44b87

File tree

21 files changed

+137
-334
lines changed

21 files changed

+137
-334
lines changed

Diff for: ydb/core/protos/table_service_config.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ message TTableServiceConfig {
299299
optional uint64 IdxLookupJoinPointsLimit = 58 [default = 3];
300300
reserved 59; //optional bool OldLookupJoinBehaviour = 59 [default = false];
301301

302-
optional bool EnableOltpSink = 60 [default = false];
302+
optional bool EnableOltpSink = 60 [default = true];
303303

304304
enum EBlockChannelsMode {
305305
BLOCK_CHANNELS_SCALAR = 0;

Diff for: ydb/tests/functional/api/test_insert.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import logging
33

4-
from hamcrest import assert_that, raises, equal_to, any_of
4+
from hamcrest import assert_that, raises, equal_to
55

66
from ydb.tests.library.harness.kikimr_runner import KiKiMR
77
from ydb.tests.oss.ydb_sdk_import import ydb
@@ -189,15 +189,9 @@ def callee():
189189
if first_query_kind in row_adding_operations and second_query_kind == 'insert':
190190
assert_that(
191191
callee,
192-
any_of(
193-
raises(
194-
ydb.PreconditionFailed,
195-
"Conflict with existing key."
196-
),
197-
raises(
198-
ydb.PreconditionFailed,
199-
"Duplicate keys have been found."
200-
)
192+
raises(
193+
ydb.PreconditionFailed,
194+
"(Duplicate keys have been found.)|(Conflict with existing key.)"
201195
)
202196
)
203197

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_dynumber_insert_from_table.sql-plan_/dynumber_insert_from_table.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,13 @@
2121
},
2222
{
2323
"name": "/local/base_dynumber_insert_from_table_sql_plan/ResultTableDyNumber",
24-
"reads": [
25-
{
26-
"lookup_by": [
27-
"Key"
28-
],
29-
"type": "Lookup"
30-
}
31-
],
3224
"writes": [
3325
{
3426
"columns": [
3527
"Key",
3628
"Value"
3729
],
38-
"type": "MultiUpsert"
30+
"type": "MultiInsert"
3931
}
4032
]
4133
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_dynumber_insert_literal.sql-plan_/dynumber_insert_literal.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@
66
"tables": [
77
{
88
"name": "/local/base_dynumber_insert_literal_sql_plan/ResultLiteralDyNumber",
9-
"reads": [
10-
{
11-
"lookup_by": [
12-
"Key"
13-
],
14-
"type": "Lookup"
15-
}
16-
],
179
"writes": [
1810
{
1911
"columns": [
2012
"Key",
2113
"Value"
2214
],
23-
"type": "MultiUpsert"
15+
"type": "MultiInsert"
2416
}
2517
]
2618
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_dynumber_insert_params.sql-plan_/dynumber_insert_params.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@
66
"tables": [
77
{
88
"name": "/local/base_dynumber_insert_params_sql_plan/ResultParamsDyNumber",
9-
"reads": [
10-
{
11-
"lookup_by": [
12-
"Key"
13-
],
14-
"type": "Lookup"
15-
}
16-
],
179
"writes": [
1810
{
1911
"columns": [
2012
"Key",
2113
"Value"
2214
],
23-
"type": "MultiUpsert"
15+
"type": "MultiInsert"
2416
}
2517
]
2618
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_explain.script-script_/explain.script.plan

+20-28
Original file line numberDiff line numberDiff line change
@@ -519,27 +519,23 @@
519519
"PlanNodeType": "Query",
520520
"Plans": [
521521
{
522-
"Node Type": "Effect",
522+
"Node Type": "Sink",
523523
"PlanNodeId": 2,
524524
"Plans": [
525525
{
526-
"CTE Name": "precompute_0_0",
527-
"Node Type": "Upsert-ConstantExpr",
526+
"Node Type": "ConstantExpr-Sink",
528527
"Operators": [
529528
{
530-
"Inputs": [
531-
{
532-
"InternalOperatorId": 1
533-
}
534-
],
535-
"Name": "Upsert",
536-
"Path": "/local/base_explain_script_script/ScriptingTest",
537-
"Table": "base_explain_script_script/ScriptingTest"
529+
"Inputs": [],
530+
"Iterator": "[{Key: 3,Value: \"Three\"},{Key: 4,Value: \"Four\"}]",
531+
"Name": "Iterator"
538532
},
539533
{
540534
"Inputs": [],
541-
"Iterator": "precompute_0_0",
542-
"Name": "Iterator"
535+
"Name": "Replace",
536+
"Path": "/local/base_explain_script_script/ScriptingTest",
537+
"SinkType": "KqpTableSink",
538+
"Table": "base_explain_script_script/ScriptingTest"
543539
}
544540
],
545541
"PlanNodeId": 1,
@@ -563,7 +559,7 @@
563559
"Key",
564560
"Value"
565561
],
566-
"type": "MultiUpsert"
562+
"type": "MultiReplace"
567563
}
568564
]
569565
}
@@ -575,27 +571,23 @@
575571
"PlanNodeType": "Query",
576572
"Plans": [
577573
{
578-
"Node Type": "Effect",
574+
"Node Type": "Sink",
579575
"PlanNodeId": 2,
580576
"Plans": [
581577
{
582-
"CTE Name": "precompute_0_0",
583-
"Node Type": "Upsert-ConstantExpr",
578+
"Node Type": "ConstantExpr-Sink",
584579
"Operators": [
585580
{
586-
"Inputs": [
587-
{
588-
"InternalOperatorId": 1
589-
}
590-
],
591-
"Name": "Upsert",
592-
"Path": "/local/base_explain_script_script/ScriptingTest",
593-
"Table": "base_explain_script_script/ScriptingTest"
581+
"Inputs": [],
582+
"Iterator": "[{Key: 1,Value: \"One\"},{Key: 2,Value: \"Two\"}]",
583+
"Name": "Iterator"
594584
},
595585
{
596586
"Inputs": [],
597-
"Iterator": "precompute_0_0",
598-
"Name": "Iterator"
587+
"Name": "Replace",
588+
"Path": "/local/base_explain_script_script/ScriptingTest",
589+
"SinkType": "KqpTableSink",
590+
"Table": "base_explain_script_script/ScriptingTest"
599591
}
600592
],
601593
"PlanNodeId": 1,
@@ -619,7 +611,7 @@
619611
"Key",
620612
"Value"
621613
],
622-
"type": "MultiUpsert"
614+
"type": "MultiReplace"
623615
}
624616
]
625617
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_join_group_by_lookup.script-script_/join_group_by_lookup.script.plan

+10-14
Original file line numberDiff line numberDiff line change
@@ -294,27 +294,23 @@
294294
"PlanNodeType": "Query",
295295
"Plans": [
296296
{
297-
"Node Type": "Effect",
297+
"Node Type": "Sink",
298298
"PlanNodeId": 2,
299299
"Plans": [
300300
{
301-
"CTE Name": "precompute_0_0",
302-
"Node Type": "Upsert-ConstantExpr",
301+
"Node Type": "ConstantExpr-Sink",
303302
"Operators": [
304303
{
305-
"Inputs": [
306-
{
307-
"InternalOperatorId": 1
308-
}
309-
],
310-
"Name": "Upsert",
311-
"Path": "/local/base_join_group_by_lookup_script_script/Temp",
312-
"Table": "base_join_group_by_lookup_script_script/Temp"
304+
"Inputs": [],
305+
"Iterator": "[{Group: 1,Value: \"One\"},{Group: 3,Value: \"Three\"}]",
306+
"Name": "Iterator"
313307
},
314308
{
315309
"Inputs": [],
316-
"Iterator": "precompute_0_0",
317-
"Name": "Iterator"
310+
"Name": "Replace",
311+
"Path": "/local/base_join_group_by_lookup_script_script/Temp",
312+
"SinkType": "KqpTableSink",
313+
"Table": "base_join_group_by_lookup_script_script/Temp"
318314
}
319315
],
320316
"PlanNodeId": 1,
@@ -338,7 +334,7 @@
338334
"Group",
339335
"Value"
340336
],
341-
"type": "MultiUpsert"
337+
"type": "MultiReplace"
342338
}
343339
]
344340
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_json_insert_from_table.sql-plan_/json_insert_from_table.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,13 @@
2121
},
2222
{
2323
"name": "/local/base_json_insert_from_table_sql_plan/ResultTableJD",
24-
"reads": [
25-
{
26-
"lookup_by": [
27-
"Key"
28-
],
29-
"type": "Lookup"
30-
}
31-
],
3224
"writes": [
3325
{
3426
"columns": [
3527
"Key",
3628
"Value"
3729
],
38-
"type": "MultiUpsert"
30+
"type": "MultiInsert"
3931
}
4032
]
4133
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_json_insert_literal.sql-plan_/json_insert_literal.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@
66
"tables": [
77
{
88
"name": "/local/base_json_insert_literal_sql_plan/ResultLiteralJD",
9-
"reads": [
10-
{
11-
"lookup_by": [
12-
"Key"
13-
],
14-
"type": "Lookup"
15-
}
16-
],
179
"writes": [
1810
{
1911
"columns": [
2012
"Key",
2113
"Value"
2214
],
23-
"type": "MultiUpsert"
15+
"type": "MultiInsert"
2416
}
2517
]
2618
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_json_insert_params.sql-plan_/json_insert_params.sql.plan

+1-9
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,13 @@
66
"tables": [
77
{
88
"name": "/local/base_json_insert_params_sql_plan/ResultParamsJD",
9-
"reads": [
10-
{
11-
"lookup_by": [
12-
"Key"
13-
],
14-
"type": "Lookup"
15-
}
16-
],
179
"writes": [
1810
{
1911
"columns": [
2012
"Key",
2113
"Value"
2214
],
23-
"type": "MultiUpsert"
15+
"type": "MultiInsert"
2416
}
2517
]
2618
}

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_simple_ct.script-script_/simple_ct.script.plan

+9-13
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,23 @@
1010
"PlanNodeType": "Query",
1111
"Plans": [
1212
{
13-
"Node Type": "Effect",
13+
"Node Type": "Sink",
1414
"PlanNodeId": 2,
1515
"Plans": [
1616
{
17-
"CTE Name": "precompute_0_0",
18-
"Node Type": "Upsert-ConstantExpr",
17+
"Node Type": "ConstantExpr-Sink",
1918
"Operators": [
2019
{
21-
"Inputs": [
22-
{
23-
"InternalOperatorId": 1
24-
}
25-
],
26-
"Name": "Upsert",
27-
"Path": "/local/base_simple_ct_script_script/Questions",
28-
"Table": "base_simple_ct_script_script/Questions"
20+
"Inputs": [],
21+
"Iterator": "[{idx: 1,text: \"to do or not to do\"}]",
22+
"Name": "Iterator"
2923
},
3024
{
3125
"Inputs": [],
32-
"Iterator": "precompute_0_0",
33-
"Name": "Iterator"
26+
"Name": "Upsert",
27+
"Path": "/local/base_simple_ct_script_script/Questions",
28+
"SinkType": "KqpTableSink",
29+
"Table": "base_simple_ct_script_script/Questions"
3430
}
3531
],
3632
"PlanNodeId": 1,

Diff for: ydb/tests/functional/canonical/canondata/test_sql.TestCanonicalFolder1.test_case_table_types.script-script_/table_types.script.plan

+10-14
Original file line numberDiff line numberDiff line change
@@ -135,27 +135,23 @@
135135
"PlanNodeType": "Query",
136136
"Plans": [
137137
{
138-
"Node Type": "Effect",
138+
"Node Type": "Sink",
139139
"PlanNodeId": 2,
140140
"Plans": [
141141
{
142-
"CTE Name": "precompute_0_0",
143-
"Node Type": "Upsert-ConstantExpr",
142+
"Node Type": "ConstantExpr-Sink",
144143
"Operators": [
145144
{
146-
"Inputs": [
147-
{
148-
"InternalOperatorId": 1
149-
}
150-
],
151-
"Name": "Upsert",
152-
"Path": "/local/base_table_types_script_script/TableTypes",
153-
"Table": "base_table_types_script_script/TableTypes"
145+
"Inputs": [],
146+
"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}]",
147+
"Name": "Iterator"
154148
},
155149
{
156150
"Inputs": [],
157-
"Iterator": "precompute_0_0",
158-
"Name": "Iterator"
151+
"Name": "Replace",
152+
"Path": "/local/base_table_types_script_script/TableTypes",
153+
"SinkType": "KqpTableSink",
154+
"Table": "base_table_types_script_script/TableTypes"
159155
}
160156
],
161157
"PlanNodeId": 1,
@@ -196,7 +192,7 @@
196192
"Value33",
197193
"Value34"
198194
],
199-
"type": "MultiUpsert"
195+
"type": "MultiReplace"
200196
}
201197
]
202198
}

0 commit comments

Comments
 (0)