Skip to content

Commit ded1634

Browse files
authored
Reimplement IFunctionTypeInfoBuilder15 via NVI (#4405)
1 parent df7d588 commit ded1634

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

ydb/library/yql/minikql/mkql_type_builder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,12 +1648,12 @@ void TFunctionTypeInfoBuilder::Unused2() {
16481648
void TFunctionTypeInfoBuilder::Unused3() {
16491649
}
16501650

1651-
NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::SupportsBlocks() {
1651+
NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::SupportsBlocksImpl() {
16521652
SupportsBlocks_ = true;
16531653
return *this;
16541654
}
16551655

1656-
NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::IsStrict() {
1656+
NUdf::IFunctionTypeInfoBuilder15& TFunctionTypeInfoBuilder::IsStrictImpl() {
16571657
IsStrict_ = true;
16581658
return *this;
16591659
}

ydb/library/yql/minikql/mkql_type_builder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ class TFunctionTypeInfoBuilder: public NUdf::IFunctionTypeInfoBuilder
163163
void Unused2() override;
164164
void Unused3() override;
165165

166-
NUdf::IFunctionTypeInfoBuilder15& SupportsBlocks() override;
167-
NUdf::IFunctionTypeInfoBuilder15& IsStrict() override;
166+
NUdf::IFunctionTypeInfoBuilder15& SupportsBlocksImpl() override;
167+
NUdf::IFunctionTypeInfoBuilder15& IsStrictImpl() override;
168168
const NUdf::IBlockTypeHelper& IBlockTypeHelper() const override;
169169

170170
bool GetSecureParam(NUdf::TStringRef key, NUdf::TStringRef& value) const override;

ydb/library/yql/public/udf/arrow/udf_arrow_helpers.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,11 @@ class TUnaryOverOptionalImpl : public TBoxedValue {
623623

624624
#define BEGIN_SIMPLE_ARROW_UDF_WITH_OPTIONAL_ARGS(udfName, signatureFunc, optArgc) \
625625
BEGIN_ARROW_UDF_IMPL(udfName##_BlocksImpl, signatureFunc, optArgc, false) \
626-
UDF_IMPL(udfName, builder.SimpleSignature<signatureFunc>().OptionalArgs(optArgc).SupportsBlocks();, ;, ;, "", "", udfName##_BlocksImpl)
626+
UDF_IMPL(udfName, builder.SimpleSignature<signatureFunc>().SupportsBlocks().OptionalArgs(optArgc);, ;, ;, "", "", udfName##_BlocksImpl)
627627

628628
#define BEGIN_SIMPLE_STRICT_ARROW_UDF_WITH_OPTIONAL_ARGS(udfName, signatureFunc, optArgc) \
629629
BEGIN_ARROW_UDF_IMPL(udfName##_BlocksImpl, signatureFunc, optArgc, true) \
630-
UDF_IMPL(udfName, builder.SimpleSignature<signatureFunc>().OptionalArgs(optArgc).SupportsBlocks().IsStrict();, ;, ;, "", "", udfName##_BlocksImpl)
630+
UDF_IMPL(udfName, builder.SimpleSignature<signatureFunc>().SupportsBlocks().IsStrict().OptionalArgs(optArgc);, ;, ;, "", "", udfName##_BlocksImpl)
631631

632632
#define END_ARROW_UDF(udfNameBlocks, exec) \
633633
inline bool udfNameBlocks::DeclareSignature(\

ydb/library/yql/public/udf/udf_type_builder.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ class IFunctionTypeInfoBuilder14: public IFunctionTypeInfoBuilder13 {
646646
#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
647647
class IFunctionTypeInfoBuilder15: public IFunctionTypeInfoBuilder14 {
648648
public:
649-
virtual IFunctionTypeInfoBuilder15& SupportsBlocks() = 0;
650-
virtual IFunctionTypeInfoBuilder15& IsStrict() = 0;
649+
virtual IFunctionTypeInfoBuilder15& SupportsBlocksImpl() = 0;
650+
virtual IFunctionTypeInfoBuilder15& IsStrictImpl() = 0;
651651
};
652652
#endif
653653

@@ -709,6 +709,18 @@ class IFunctionTypeInfoBuilder: public IFunctionTypeInfoBuilderImpl {
709709
return *this;
710710
}
711711

712+
#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
713+
IFunctionTypeInfoBuilder& SupportsBlocks() {
714+
SupportsBlocksImpl();
715+
return *this;
716+
}
717+
718+
IFunctionTypeInfoBuilder& IsStrict() {
719+
IsStrictImpl();
720+
return *this;
721+
}
722+
#endif
723+
712724
IFunctionTypeInfoBuilder& Returns(TDataTypeId type) {
713725
ReturnsImpl(type);
714726
return *this;

0 commit comments

Comments
 (0)