Skip to content

Commit f97455e

Browse files
committed
Tweak DeclareSignature for DigestFunctionUDF class
1 parent 8571c01 commit f97455e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

yql/essentials/udfs/common/digest/digest_udf.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <yql/essentials/public/udf/udf_helpers.h>
22
#include <yql/essentials/public/udf/udf_value_builder.h>
33

4+
#include <yql/essentials/minikql/mkql_runtime_version.h>
5+
46
#include <util/digest/murmur.h>
57
#include <util/digest/city.h>
68
#include <util/digest/numeric.h>
@@ -56,6 +58,15 @@ namespace {
5658
return false;
5759
}
5860

61+
// FIXME: The condition below is required to untie the
62+
// Gordian knot with the upgrade, when two MiniKQL
63+
// runtimes with different versions are being used.
64+
// See YQL-19967 for more info.
65+
if (MKQL_RUNTIME_VERSION < 51U && typesOnly) {
66+
builder.SimpleSignature<TResult(TAutoMap<char*>)>();
67+
return true;
68+
}
69+
5970
auto args = builder.Args();
6071
args->Add(builder.SimpleType<char *>()).Flags(ICallablePayload::TArgumentFlags::AutoMap);
6172
args->Add(builder.Optional()->Item(builder.SimpleType<TResult>()).Build()).Name("Init");

0 commit comments

Comments
 (0)