@@ -316,6 +316,18 @@ struct TGetTimeComponent {
316
316
317
317
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
318
318
if (features & NUdf::BigDateType) {
319
+ // FIXME: The condition below is required to untie the
320
+ // Gordian knot with the upgrade, when two MiniKQL
321
+ // runtimes with different versions are being used.
322
+ // See YQL-19967 for more info.
323
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
324
+ ::TStringBuilder sb;
325
+ sb << " Invalid argument type: got " ;
326
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
327
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
328
+ builder.SetError (sb);
329
+ return true ;
330
+ }
319
331
BuildSignature<TFieldStorage, TM64ResourceName, WAccessor>(builder, typesOnly);
320
332
return true ;
321
333
}
@@ -1158,6 +1170,18 @@ class TGetDateComponent: public ::NYql::NUdf::TBoxedValue {
1158
1170
1159
1171
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
1160
1172
if (features & NUdf::BigDateType) {
1173
+ // FIXME: The condition below is required to untie the
1174
+ // Gordian knot with the upgrade, when two MiniKQL
1175
+ // runtimes with different versions are being used.
1176
+ // See YQL-19967 for more info.
1177
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
1178
+ ::TStringBuilder sb;
1179
+ sb << " Invalid argument type: got " ;
1180
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
1181
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
1182
+ builder.SetError (sb);
1183
+ return true ;
1184
+ }
1161
1185
BuildSignature<TResultWType, TM64ResourceName, WAccessor>(builder, typesOnly);
1162
1186
return true ;
1163
1187
}
@@ -1282,6 +1306,18 @@ class TGetDateComponentName: public ::NYql::NUdf::TBoxedValue {
1282
1306
1283
1307
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
1284
1308
if (features & NUdf::BigDateType) {
1309
+ // FIXME: The condition below is required to untie the
1310
+ // Gordian knot with the upgrade, when two MiniKQL
1311
+ // runtimes with different versions are being used.
1312
+ // See YQL-19967 for more info.
1313
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
1314
+ ::TStringBuilder sb;
1315
+ sb << " Invalid argument type: got " ;
1316
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
1317
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
1318
+ builder.SetError (sb);
1319
+ return true ;
1320
+ }
1285
1321
BuildSignature<TM64ResourceName, WAccessor>(builder, typesOnly);
1286
1322
return true ;
1287
1323
}
@@ -1532,6 +1568,18 @@ TUnboxedValue GetTimezoneName(const IValueBuilder* valueBuilder, const TUnboxedV
1532
1568
1533
1569
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
1534
1570
if (features & NUdf::BigDateType) {
1571
+ // FIXME: The condition below is required to untie the
1572
+ // Gordian knot with the upgrade, when two MiniKQL
1573
+ // runtimes with different versions are being used.
1574
+ // See YQL-19967 for more info.
1575
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
1576
+ ::TStringBuilder sb;
1577
+ sb << " Invalid argument type: got " ;
1578
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
1579
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
1580
+ builder.SetError (sb);
1581
+ return true ;
1582
+ }
1535
1583
BuildSignature<TM64ResourceName>(builder, typesOnly);
1536
1584
return true ;
1537
1585
}
@@ -1844,6 +1892,18 @@ class TBoundaryOf: public ::NYql::NUdf::TBoxedValue {
1844
1892
1845
1893
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
1846
1894
if (features & NUdf::BigDateType) {
1895
+ // FIXME: The condition below is required to untie the
1896
+ // Gordian knot with the upgrade, when two MiniKQL
1897
+ // runtimes with different versions are being used.
1898
+ // See YQL-19967 for more info.
1899
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
1900
+ ::TStringBuilder sb;
1901
+ sb << " Invalid argument type: got " ;
1902
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
1903
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
1904
+ builder.SetError (sb);
1905
+ return true ;
1906
+ }
1847
1907
BuildSignature<TM64ResourceName, WBoundary>(builder, typesOnly);
1848
1908
return true ;
1849
1909
}
@@ -2235,6 +2295,18 @@ class TShift : public TBoxedValue {
2235
2295
2236
2296
const auto features = NUdf::GetDataTypeInfo (NUdf::GetDataSlot (data.GetTypeId ())).Features ;
2237
2297
if (features & NUdf::BigDateType) {
2298
+ // FIXME: The condition below is required to untie the
2299
+ // Gordian knot with the upgrade, when two MiniKQL
2300
+ // runtimes with different versions are being used.
2301
+ // See YQL-19967 for more info.
2302
+ if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
2303
+ ::TStringBuilder sb;
2304
+ sb << " Invalid argument type: got " ;
2305
+ TTypePrinter (*typeInfoHelper, argType).Out (sb.Out );
2306
+ sb << " , but Resource<" << TMResourceName << " > expected" ;
2307
+ builder.SetError (sb);
2308
+ return true ;
2309
+ }
2238
2310
BuildSignature<TM64ResourceName, WShifter>(builder, typesOnly);
2239
2311
return true ;
2240
2312
}
0 commit comments