Skip to content

Pushdown some unary operators. #957

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

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

Tony-Romanov
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Jan 12, 2024

Note

This is an automated comment that will be appended during run.

🔴 linux-x86_64-relwithdebinfo: some tests FAILED for commit bdd2383.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
59669 50454 0 21 9193 1

🔴 linux-x86_64-release-asan: some tests FAILED for commit bdd2383.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
15836 15689 0 35 109 3

@Tony-Romanov Tony-Romanov marked this pull request as ready for review January 12, 2024 10:26
if (!EnsureAtom(*op, ctx)) {
return false;
}
if (!op->IsAtom({"minus","abs","not","size","exists","empty"})) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Usually with space between items:
{"minus", "abs", "not", "size", "exists", "empty"}

if (!EnsureAtom(*op, ctx)) {
return false;
}
if (!op->IsAtom({"minus","abs","not","size","exists","empty"})) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the difference between "not" here and TKqpOlapNot?
And the same question about TKqpOlapFilterExists?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's common replacement for these callables. I will not use them i future.

} else if (IsSupportedArithmeticalExpression(node, settings)) {
TCoBinaryArithmetic op = node.Cast<TCoBinaryArithmetic>();
return CheckExpressionNodeForPushdown(op.Left(), lambdaArg, settings) && CheckExpressionNodeForPushdown(op.Right(), lambdaArg, settings);
} else if (const auto op = node.Maybe<TCoUnaryArithmetic>(); op && settings.IsEnabled(TSettings::EFeatureFlag::ArithmeticalExpressions)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This function is also called here
If you don't want to support a new expression here and futher throught the stack of generic provider, it's better to disable it with another flag in settings for generic provider and enable in OLAP

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And where is tests for generic provider?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ydb/core/kqp/ut/federated_query/generic
ydb/core/kqp/ut/federated_query/generic_ut

@Tony-Romanov Tony-Romanov merged commit 80aea4f into ydb-platform:main Jan 16, 2024
@Tony-Romanov Tony-Romanov deleted the add_unary_ops branch January 16, 2024 10:00
@niksaveliev niksaveliev mentioned this pull request Jan 29, 2024
@vitstn vitstn mentioned this pull request Jan 29, 2024
@starlinskiy starlinskiy mentioned this pull request Feb 12, 2024
@vitstn vitstn mentioned this pull request Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants