Skip to content

Commit

Permalink
Merge 6c8c1fc into 1acf95f
Browse files Browse the repository at this point in the history
  • Loading branch information
qrort authored Apr 7, 2024
2 parents 1acf95f + 6c8c1fc commit d93e7ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 0 additions & 2 deletions ydb/core/tx/schemeshard/ut_export/ut_export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ Y_UNIT_TEST_SUITE(TExportToS3Tests) {
}
}
}
not_null: false
from_literal {
type {
optional_type {
Expand All @@ -390,7 +389,6 @@ columns {
}
}
}
not_null: false
from_literal {
type {
optional_type {
Expand Down
10 changes: 6 additions & 4 deletions ydb/core/ydb_convert/table_description.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,15 @@ static Ydb::Type* AddColumn(Ydb::Table::ColumnMeta* newColumn, const TColumn& co
pg->set_oid(NPg::PgTypeIdFromTypeDesc(typeDesc));
pg->set_typlen(0);
pg->set_typmod(0);
if (column.GetNotNull()) {
newColumn->set_not_null(column.GetNotNull());
}
} else {
NYql::NProto::TypeIds protoType;
if (!NYql::NProto::TypeIds_Parse(column.GetType(), &protoType)) {
throw NYql::TErrorException(NKikimrIssues::TIssuesIds::DEFAULT_ERROR)
<< "Got invalid type: " << column.GetType() << " for column: " << column.GetName();
}

if (column.GetNotNull()) {
columnType = newColumn->mutable_type();
} else {
Expand All @@ -392,7 +394,6 @@ static Ydb::Type* AddColumn(Ydb::Table::ColumnMeta* newColumn, const TColumn& co
NMiniKQL::ExportPrimitiveTypeToProto(protoType, *columnType);
}
}
newColumn->set_not_null(column.GetNotNull());
return columnType;
}

Expand All @@ -410,13 +411,15 @@ Ydb::Type* AddColumn<NKikimrSchemeOp::TColumnDescription>(Ydb::Table::ColumnMeta
pg->set_oid(NPg::PgTypeIdFromTypeDesc(typeDesc));
pg->set_typlen(0);
pg->set_typmod(0);
if (column.GetNotNull()) {
newColumn->set_not_null(column.GetNotNull());
}
} else {
NYql::NProto::TypeIds protoType;
if (!NYql::NProto::TypeIds_Parse(column.GetType(), &protoType)) {
throw NYql::TErrorException(NKikimrIssues::TIssuesIds::DEFAULT_ERROR)
<< "Got invalid type: " << column.GetType() << " for column: " << column.GetName();
}

if (column.GetNotNull()) {
columnType = newColumn->mutable_type();
} else {
Expand All @@ -432,7 +435,6 @@ Ydb::Type* AddColumn<NKikimrSchemeOp::TColumnDescription>(Ydb::Table::ColumnMeta
NMiniKQL::ExportPrimitiveTypeToProto(protoType, *columnType);
}
}
newColumn->set_not_null(column.GetNotNull());
switch (column.GetDefaultValueCase()) {
case NKikimrSchemeOp::TColumnDescription::kDefaultFromLiteral: {
auto fromLiteral = newColumn->mutable_from_literal();
Expand Down
4 changes: 0 additions & 4 deletions ydb/services/ydb/ydb_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,6 @@ columns {
}
}
}
not_null: false
}
columns {
name: "Value"
Expand All @@ -1279,7 +1278,6 @@ columns {
}
}
}
not_null: false
}
primary_key: "Key"
partitioning_settings {
Expand Down Expand Up @@ -1607,7 +1605,6 @@ columns {
}
}
}
not_null: false
}
columns {
name: "IValue"
Expand All @@ -1618,7 +1615,6 @@ columns {
}
}
}
not_null: false
}
primary_key: "Key"
indexes {
Expand Down

0 comments on commit d93e7ae

Please sign in to comment.