Skip to content

Commit 0f71891

Browse files
authored
Merge b0587ef into c0d60de
2 parents c0d60de + b0587ef commit 0f71891

32 files changed

+114
-114
lines changed

ydb/core/grpc_services/rpc_kh_describe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class TKikhouseDescribeTableRPC : public TActorBootstrapped<TKikhouseDescribeTab
179179
auto& typeInfo = col.second.PType;
180180
auto* item = colMeta->mutable_type();
181181
if (typeInfo.GetTypeId() == NScheme::NTypeIds::Pg) {
182-
auto* typeDesc = typeInfo.GetTypeDesc();
182+
auto typeDesc = typeInfo.GetTypeDesc();
183183
auto* pg = item->mutable_pg_type();
184184
pg->set_type_name(NPg::PgTypeNameFromTypeDesc(typeDesc));
185185
pg->set_oid(NPg::PgTypeIdFromTypeDesc(typeDesc));

ydb/core/grpc_services/rpc_read_rows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class TReadRowsRPC : public TActorBootstrapped<TReadRowsRPC> {
164164
}
165165
} else if (typeInProto.has_pg_type()) {
166166
const auto& typeName = typeInProto.pg_type().type_name();
167-
auto* typeDesc = NPg::TypeDescFromPgTypeName(typeName);
167+
auto typeDesc = NPg::TypeDescFromPgTypeName(typeName);
168168
if (!typeDesc) {
169169
errorMessage = Sprintf("Unknown pg type for column %s: %s",
170170
name.c_str(), typeName.c_str());

ydb/core/io_formats/cell_maker/cell_maker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ namespace {
108108
}
109109

110110
template <typename T>
111-
bool TryParse(TStringBuf value, T& result, TString& err, void* parseParam) {
111+
bool TryParse(TStringBuf value, T& result, TString& err, const void* parseParam) {
112112
Y_UNUSED(value);
113113
Y_UNUSED(result);
114114
Y_UNUSED(err);
@@ -117,7 +117,7 @@ namespace {
117117
}
118118

119119
template <>
120-
bool TryParse(TStringBuf value, NPg::TConvertResult& result, TString& err, void* typeDesc) {
120+
bool TryParse(TStringBuf value, NPg::TConvertResult& result, TString& err, const void* typeDesc) {
121121
TString unescaped;
122122
if (!CheckedUnescape(value, unescaped)) {
123123
err = MakeError<NPg::TConvertResult>();
@@ -233,7 +233,7 @@ namespace {
233233
return Conv(c, v, pool, conv);
234234
}
235235

236-
static bool Make(TCell& c, TStringBuf v, TMemoryPool& pool, TString& err, TConverter<T, TStringBuf> conv, void* parseParam) {
236+
static bool Make(TCell& c, TStringBuf v, TMemoryPool& pool, TString& err, TConverter<T, TStringBuf> conv, const void* parseParam) {
237237
T t;
238238
if (!TryParse<T>(v, t, err, parseParam)) {
239239
return false;

ydb/core/kqp/provider/read_attributes_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void ReplaceReadAttributes(TExprNode& node,
218218
static Ydb::Type CreateYdbType(const NKikimr::NScheme::TTypeInfo& typeInfo, bool notNull) {
219219
Ydb::Type ydbType;
220220
if (typeInfo.GetTypeId() == NKikimr::NScheme::NTypeIds::Pg) {
221-
auto* typeDesc = typeInfo.GetTypeDesc();
221+
auto typeDesc = typeInfo.GetTypeDesc();
222222
auto* pg = ydbType.mutable_pg_type();
223223
pg->set_type_name(NKikimr::NPg::PgTypeNameFromTypeDesc(typeDesc));
224224
pg->set_oid(NKikimr::NPg::PgTypeIdFromTypeDesc(typeDesc));

ydb/core/kqp/provider/yql_kikimr_gateway.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ EYqlIssueCode YqlStatusFromYdbStatus(ui32 ydbStatus) {
177177
}
178178

179179
void SetColumnType(Ydb::Type& protoType, const TString& typeName, bool notNull) {
180-
auto* typeDesc = NKikimr::NPg::TypeDescFromPgTypeName(typeName);
180+
auto typeDesc = NKikimr::NPg::TypeDescFromPgTypeName(typeName);
181181
if (typeDesc) {
182182
Y_ABORT_UNLESS(!notNull, "It is not allowed to create NOT NULL pg columns");
183183
auto* pg = protoType.mutable_pg_type();

ydb/core/kqp/provider/yql_kikimr_provider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ std::optional<TString> FillLiteralProto(NNodes::TExprBase maybeLiteral, const TT
668668
auto actualPgType = valueType->Cast<TPgExprType>();
669669
YQL_ENSURE(actualPgType);
670670

671-
auto* typeDesc = NKikimr::NPg::TypeDescFromPgTypeId(actualPgType->GetId());
671+
auto typeDesc = NKikimr::NPg::TypeDescFromPgTypeId(actualPgType->GetId());
672672
if (!typeDesc) {
673673
return TStringBuilder() << "Failed to parse default expr typename " << actualPgType->GetName();
674674
}

ydb/core/kqp/provider/yql_kikimr_results.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ const TTypeAnnotationNode* ParseTypeFromYdbType(const Ydb::Type& type, TExprCont
888888
case Ydb::Type::kPgType: {
889889
if (!type.pg_type().type_name().empty()) {
890890
const auto& typeName = type.pg_type().type_name();
891-
auto* typeDesc = NKikimr::NPg::TypeDescFromPgTypeName(typeName);
891+
auto typeDesc = NKikimr::NPg::TypeDescFromPgTypeName(typeName);
892892
return ctx.MakeType<TPgExprType>(NKikimr::NPg::PgTypeIdFromTypeDesc(typeDesc));
893893
}
894894
return ctx.MakeType<TPgExprType>(type.pg_type().Getoid());

ydb/core/kqp/query_compiler/kqp_mkql_compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ TVector<TKqpTableColumn> GetKqpColumns(const TKikimrTableMetadata& table, const
2525
ui32 columnId = 0;
2626
ui32 columnType = 0;
2727
bool notNull = false;
28-
void* columnTypeDesc = nullptr;
28+
const void* columnTypeDesc = nullptr;
2929

3030
auto columnData = table.Columns.FindPtr(name);
3131
if (columnData) {

ydb/core/kqp/runtime/kqp_program_builder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ struct TKqpTableColumn {
1313
TString Name;
1414
NUdf::TDataTypeId Type;
1515
bool NotNull;
16-
void* TypeDesc;
16+
const void* TypeDesc;
1717

18-
TKqpTableColumn(ui32 id, const TStringBuf& name, NUdf::TDataTypeId type, bool notNull, void* typeDesc)
18+
TKqpTableColumn(ui32 id, const TStringBuf& name, NUdf::TDataTypeId type, bool notNull, const void* typeDesc)
1919
: Id(id)
2020
, Name(name)
2121
, Type(type)

ydb/core/kqp/runtime/kqp_write_table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class TRowBuilder {
231231
CellsInfo[index].Value = value;
232232

233233
if (type.GetTypeId() == NScheme::NTypeIds::Pg) {
234-
const auto typeDesc = type.GetTypeDesc();
234+
auto typeDesc = type.GetTypeDesc();
235235
if (typmod != -1 && NPg::TypeDescNeedsCoercion(typeDesc)) {
236236
TMaybe<TString> err;
237237
CellsInfo[index].PgBinaryValue = NYql::NCommon::PgValueCoerce(value, NPg::PgTypeIdFromTypeDesc(typeDesc), typmod, &err);

0 commit comments

Comments
 (0)