Skip to content

Commit 12870c7

Browse files
committed
Tweak signatures for Resource<Datetime2.TM64> overloads
1 parent 55fa508 commit 12870c7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

yql/essentials/udfs/common/datetime2/datetime_udf.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,6 +2547,16 @@ class TBoundaryOfInterval: public ::NYql::NUdf::TBoxedValue {
25472547
}
25482548

25492549
if (resource.GetTag() == TStringRef::Of(TM64ResourceName)) {
2550+
// FIXME: The condition below is required to untie the
2551+
// Gordian knot with the upgrade, when two MiniKQL
2552+
// runtimes with different versions are being used.
2553+
// See YQL-19967 for more info.
2554+
if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
2555+
::TStringBuilder sb;
2556+
sb << "Unexpected Resource tag: got '" << resource.GetTag() << "'";
2557+
builder.SetError(sb);
2558+
return true;
2559+
}
25502560
BuildSignature<TM64ResourceName, WBoundary>(builder, typesOnly);
25512561
return true;
25522562
}
@@ -2681,6 +2691,16 @@ class TTimeOfDay: public ::NYql::NUdf::TBoxedValue {
26812691
}
26822692

26832693
if (resource.GetTag() == TStringRef::Of(TM64ResourceName)) {
2694+
// FIXME: The condition below is required to untie the
2695+
// Gordian knot with the upgrade, when two MiniKQL
2696+
// runtimes with different versions are being used.
2697+
// See YQL-19967 for more info.
2698+
if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
2699+
::TStringBuilder sb;
2700+
sb << "Unexpected Resource tag: got '" << resource.GetTag() << "'";
2701+
builder.SetError(sb);
2702+
return true;
2703+
}
26842704
BuildSignature<TM64ResourceName>(builder, typesOnly);
26852705
return true;
26862706
}

0 commit comments

Comments
 (0)