-
Notifications
You must be signed in to change notification settings - Fork 734
YQ-3824 Shared reading: fix is not distinct from with optional field
#11378
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
YQ-3824 Shared reading: fix is not distinct from with optional field
#11378
Conversation
|
⚪ |
|
⚪ |
|
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| if (predicate.Ref().ChildrenSize() != 2 ) { | ||
| return false; | ||
| } | ||
| auto expr1 = predicate.Ref().Child(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
оберни сразу в TExprBase, у тебя выражения повторяются в этой функции
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| auto sqlIn = predicate.Cast<TCoSqlIn>(); | ||
| predicateTree.CanBePushed = SqlInCanBePushed(sqlIn, lambdaArg, lambdaBody, settings); | ||
| } else if (settings.IsEnabled(TSettings::EFeatureFlag::IsDistinctOperator) && | ||
| (predicate.Ref().IsCallable("IsNotDistinctFrom") || predicate.Ref().IsCallable("IsDistinctFrom"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в IsCallable можно передать сразу несколько строк
IsCallable({"IsNotDistinctFrom"sv, "IsDistinctFrom"sv})
| auto predicate = coalesce.Predicate(); | ||
| if (auto compare = predicate.Maybe<TCoCompare>()) { | ||
| return SerializeCompare(compare.Cast(), proto, arg, err); | ||
| } else if (auto sqlIn = predicate.Maybe<TCoSqlIn>()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
какая связь между in и coalesce ? странно видеть in внутри coalesce
| auto predicate = coalesce.Predicate(); | ||
| if (auto compare = predicate.Maybe<TCoCompare>()) { | ||
| return SerializeCompare(compare.Cast(), proto, arg, err); | ||
| } else if (auto sqlIn = predicate.Maybe<TCoSqlIn>()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else избыточен
|
|
||
| bool SerializeIsNotDistinctFrom(const TExprBase& predicate, TPredicate* predicateProto, const TCoArgument& arg, TStringBuilder& err, bool invert) { | ||
| if (predicate.Ref().ChildrenSize() != 2 ) { | ||
| err << "unknown predicate, children size " << predicate.Ref().ChildrenSize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
напиши, что ожидалось 2, а пришло столько-то
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
is not dinstinct from with optional field
is not dinstinct from with optional field is not distinct from with optional field
…dintinct-with-opt-field
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
| predicateTree.CanBePushed = SqlInCanBePushed(sqlIn, lambdaArg, lambdaBody, settings); | ||
| } else if (settings.IsEnabled(TSettings::EFeatureFlag::IsDistinctOperator) && | ||
| (predicate.Ref().IsCallable({"IsNotDistinctFrom", "IsDistinctFrom"}))) { | ||
| predicateTree.CanBePushed = IsDistinctCanBePushed(predicate, lambdaArg, lambdaBody, settings);; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лишняя ;
| || !CheckExpressionNodeForPushdown(expr2, lambdaArg, settings)) { | ||
| return false; | ||
| } | ||
| const TTypeAnnotationNode* inputType = lambdaBody.Ptr()->GetTypeAnn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Переменную можно перетащить внутрь if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Или объединить два if
| return SerializeExpression(compare.Left(), proto->mutable_left_value(), arg, err) && SerializeExpression(compare.Right(), proto->mutable_right_value(), arg, err); | ||
| } | ||
|
|
||
| bool SerializeSqlIn(const TCoSqlIn& sqlIn, TPredicate* proto, const TCoArgument& arg, TStringBuilder& err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лишнее объявление
|
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
...
Changelog category
Additional information
...