Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement IFunctionTypeInfoBuilder15 via NVI #4405

Conversation

igormunkin
Copy link
Collaborator

All the interfaces provided by IFunctionTypeInfoBuilder15 has no non-virtual wrappers in the public interface IFunctionTypeInfoBuilder, and yield the instance of the particular version of the interface. This might break the chain of hints for function type builder.

This patch reimplements IFunctionTypeInfoBuilder15 via NVI pattern following the way all previous versions of this interface are written.

To ensure everything works fine as a result of the previous patch, the hints used to create simple Arrow UDFs with optional arguments are reordered in the right way.

Changelog category

  • Not for changelog (changelog entry is not required)

Copy link

github-actions bot commented May 8, 2024

2024-05-08 14:53:59 UTC Pre-commit check for 8b17938 has started.
2024-05-08 14:54:01 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-05-08 15:24:57 UTC Build successful.

Copy link

github-actions bot commented May 8, 2024

2024-05-08 14:54:14 UTC Pre-commit check for 8b17938 has started.
2024-05-08 14:54:17 UTC Build linux-x86_64-release-asan is running...
🟢 2024-05-08 15:24:24 UTC Build successful.
2024-05-08 15:26:11 UTC Tests are running...
🔴 2024-05-08 17:13:03 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14232 14068 0 46 111 7

Copy link

github-actions bot commented May 8, 2024

2024-05-08 14:54:44 UTC Pre-commit check for 8b17938 has started.
2024-05-08 14:54:46 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-05-08 15:26:19 UTC Build successful.
2024-05-08 15:27:57 UTC Tests are running...
🔴 2024-05-08 17:26:54 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
73025 59835 0 5 13175 10

@igormunkin igormunkin marked this pull request as ready for review May 13, 2024 08:07
@igormunkin igormunkin requested a review from a team as a code owner May 13, 2024 08:07
@@ -646,8 +646,8 @@ class IFunctionTypeInfoBuilder14: public IFunctionTypeInfoBuilder13 {
#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
class IFunctionTypeInfoBuilder15: public IFunctionTypeInfoBuilder14 {
public:
virtual IFunctionTypeInfoBuilder15& SupportsBlocks() = 0;
virtual IFunctionTypeInfoBuilder15& IsStrict() = 0;
virtual IFunctionTypeInfoBuilder15& SupportsBlocksImpl(void) = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давай тут вид уберем

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

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

#if UDF_ABI_COMPATIBILITY_VERSION_CURRENT >= UDF_ABI_COMPATIBILITY_VERSION(2, 28)
IFunctionTypeInfoBuilder& SupportsBlocks(void) {
SupportsBlocksImpl();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда уж return SupportsBlocksImpl();

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline: decided to left intact to be in sync with the surrounding sources.

All the interfaces provided by IFunctionTypeInfoBuilder15 has no
non-virtual wrappers in the public interface IFunctionTypeInfoBuilder,
and yield the instance of the particular version of the interface. This
might break the chain of hints for function type builder.

This patch reimplements IFunctionTypeInfoBuilder15 via NVI pattern
following the way all previous versions of this interface are written.
To ensure everything works fine as a result of the previous patch, the
hints used to create simple Arrow UDFs with optional arguments are
reordered in the right way.
@igormunkin igormunkin force-pushed the imun/fix-nvi-for-IFunctionTypeInfoBuilder15 branch from 5bd7fff to a2b08e0 Compare May 13, 2024 13:34
@igormunkin igormunkin requested a review from nepal May 13, 2024 13:34
Copy link

github-actions bot commented May 13, 2024

2024-05-13 13:37:56 UTC Pre-commit check for 14a4cbd has started.
2024-05-13 13:37:58 UTC Build linux-x86_64-release-asan is running...
🟢 2024-05-13 14:07:39 UTC Build successful.
2024-05-13 14:09:28 UTC Tests are running...
🔴 2024-05-13 15:54:46 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14221 14127 0 34 52 8

Copy link

github-actions bot commented May 13, 2024

2024-05-13 13:38:02 UTC Pre-commit check for 14a4cbd has started.
2024-05-13 13:38:05 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-05-13 14:08:28 UTC Build successful.

Copy link

github-actions bot commented May 13, 2024

2024-05-13 13:40:11 UTC Pre-commit check for 14a4cbd has started.
2024-05-13 13:40:14 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-05-13 14:10:58 UTC Build successful.
2024-05-13 14:12:44 UTC Tests are running...
🔴 2024-05-13 16:13:43 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
73061 59851 0 11 13188 11

@igormunkin igormunkin merged commit ded1634 into ydb-platform:main May 13, 2024
3 of 5 checks passed
@igormunkin igormunkin deleted the imun/fix-nvi-for-IFunctionTypeInfoBuilder15 branch May 13, 2024 19:12
MrLolthe1st pushed a commit to MrLolthe1st/ydb that referenced this pull request May 28, 2024
This was referenced Jun 6, 2024
This was referenced Jun 6, 2024
@niksaveliev niksaveliev mentioned this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants