Skip to content

Commit c101dc8

Browse files
committed
KIKIMR-18545: do not set not_null for default values
1 parent a833a43 commit c101dc8

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

ydb/core/tx/schemeshard/ut_export/ut_export.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ Y_UNIT_TEST_SUITE(TExportToS3Tests) {
365365
}
366366
}
367367
}
368-
not_null: false
369368
from_literal {
370369
type {
371370
optional_type {
@@ -390,7 +389,6 @@ columns {
390389
}
391390
}
392391
}
393-
not_null: false
394392
from_literal {
395393
type {
396394
optional_type {

ydb/core/ydb_convert/table_description.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,9 @@ static Ydb::Type* AddColumn(Ydb::Table::ColumnMeta* newColumn, const TColumn& co
392392
NMiniKQL::ExportPrimitiveTypeToProto(protoType, *columnType);
393393
}
394394
}
395-
newColumn->set_not_null(column.GetNotNull());
395+
if (column.GetNotNull()) {
396+
newColumn->set_not_null(column.GetNotNull());
397+
}
396398
return columnType;
397399
}
398400

ydb/services/ydb/ydb_ut.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,6 @@ columns {
12681268
}
12691269
}
12701270
}
1271-
not_null: false
12721271
}
12731272
columns {
12741273
name: "Value"
@@ -1279,7 +1278,6 @@ columns {
12791278
}
12801279
}
12811280
}
1282-
not_null: false
12831281
}
12841282
primary_key: "Key"
12851283
partitioning_settings {
@@ -1607,7 +1605,6 @@ columns {
16071605
}
16081606
}
16091607
}
1610-
not_null: false
16111608
}
16121609
columns {
16131610
name: "IValue"
@@ -1618,7 +1615,6 @@ columns {
16181615
}
16191616
}
16201617
}
1621-
not_null: false
16221618
}
16231619
primary_key: "Key"
16241620
indexes {

0 commit comments

Comments
 (0)