@@ -108,23 +108,23 @@ 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 NScheme::TTypeInfo& typeInfo ) {
112112 Y_UNUSED (value);
113113 Y_UNUSED (result);
114114 Y_UNUSED (err);
115- Y_UNUSED (parseParam );
116- Y_ABORT (" TryParse with parseParam is unimplemented" );
115+ Y_UNUSED (typeInfo );
116+ Y_ABORT (" TryParse with typeInfo is unimplemented" );
117117 }
118118
119- template <>
120- bool TryParse (TStringBuf value, NPg::TConvertResult& result, TString& err, void * typeDesc ) {
119+ template <>
120+ bool TryParse<NPg::TConvertResult> (TStringBuf value, NPg::TConvertResult& result, TString& err, const NScheme::TTypeInfo& typeInfo ) {
121121 TString unescaped;
122122 if (!CheckedUnescape (value, unescaped)) {
123123 err = MakeError<NPg::TConvertResult>();
124124 return false ;
125125 }
126126
127- result = NPg::PgNativeBinaryFromNativeText (unescaped, typeDesc );
127+ result = NPg::PgNativeBinaryFromNativeText (unescaped, typeInfo. GetPgTypeDesc () );
128128 if (result.Error ) {
129129 err = *result.Error ;
130130 return false ;
@@ -233,9 +233,9 @@ 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 NScheme::TTypeInfo& typeInfo ) {
237237 T t;
238- if (!TryParse<T> (v, t, err, parseParam )) {
238+ if (!TryParse (v, t, err, typeInfo )) {
239239 return false ;
240240 }
241241
@@ -266,12 +266,12 @@ namespace {
266266
267267} // anonymous
268268
269- bool MakeCell (TCell& cell, TStringBuf value, NScheme::TTypeInfo type , TMemoryPool& pool, TString& err) {
269+ bool MakeCell (TCell& cell, TStringBuf value, const NScheme::TTypeInfo& typeInfo , TMemoryPool& pool, TString& err) {
270270 if (value == " null" ) {
271271 return true ;
272272 }
273273
274- switch (type .GetTypeId ()) {
274+ switch (typeInfo .GetTypeId ()) {
275275 case NScheme::NTypeIds::Bool:
276276 return TCellMaker<bool >::Make (cell, value, pool, err);
277277 case NScheme::NTypeIds::Int8:
@@ -322,21 +322,21 @@ bool MakeCell(TCell& cell, TStringBuf value, NScheme::TTypeInfo type, TMemoryPoo
322322 case NScheme::NTypeIds::Decimal:
323323 return TCellMaker<NYql::NDecimal::TInt128, std::pair<ui64, ui64>>::Make (cell, value, pool, err, &Int128ToPair);
324324 case NScheme::NTypeIds::Pg:
325- return TCellMaker<NPg::TConvertResult, TStringBuf>::Make (cell, value, pool, err, &PgToStringBuf, type. GetTypeDesc () );
325+ return TCellMaker<NPg::TConvertResult, TStringBuf>::Make (cell, value, pool, err, &PgToStringBuf, typeInfo );
326326 case NScheme::NTypeIds::Uuid:
327327 return TCellMaker<TUuidHolder, TStringBuf>::Make (cell, value, pool, err, &UuidToStringBuf);
328328 default :
329329 return false ;
330330 }
331331}
332332
333- bool MakeCell (TCell& cell, const NJson::TJsonValue& value, NScheme::TTypeInfo type , TMemoryPool& pool, TString& err) {
333+ bool MakeCell (TCell& cell, const NJson::TJsonValue& value, const NScheme::TTypeInfo& typeInfo , TMemoryPool& pool, TString& err) {
334334 if (value.IsNull ()) {
335335 return true ;
336336 }
337337
338338 try {
339- switch (type .GetTypeId ()) {
339+ switch (typeInfo .GetTypeId ()) {
340340 case NScheme::NTypeIds::Bool:
341341 return TCellMaker<bool >::MakeDirect (cell, value.GetBooleanSafe (), pool, err);
342342 case NScheme::NTypeIds::Int8:
@@ -403,12 +403,12 @@ bool MakeCell(TCell& cell, const NJson::TJsonValue& value, NScheme::TTypeInfo ty
403403 }
404404}
405405
406- bool CheckCellValue (const TCell& cell, NScheme::TTypeInfo type ) {
406+ bool CheckCellValue (const TCell& cell, const NScheme::TTypeInfo& typeInfo ) {
407407 if (cell.IsNull ()) {
408408 return true ;
409409 }
410410
411- switch (type .GetTypeId ()) {
411+ switch (typeInfo .GetTypeId ()) {
412412 case NScheme::NTypeIds::Bool:
413413 case NScheme::NTypeIds::Int8:
414414 case NScheme::NTypeIds::Uint8:
0 commit comments