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

[Fix](bug) Is null predicate get error query result #41668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HappenLee
Copy link
Contributor

Proposed changes

Fix Before Error Query Result:

create table t(a int, b int) duplicate key(`a`, `b`) DISTRIBUTED BY RANDOM BUCKETS AUTO PROPERTIES ( "replication_allocation" = "tag.location.default: 1");
insert into t values(-2147483648, -2147483648);
mysql> select * from t where a is null;
+-------------+-------------+
| a           | b           |
+-------------+-------------+
| -2147483648 | -2147483648 |
+-------------+-------------+
1 row in set (0.03 sec)

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@HappenLee
Copy link
Contributor Author

run buildall

@HappenLee HappenLee added dev/2.0.x dev/2.1.x dev/3.0.x kind/fix Categorizes issue or PR as related to a bug. labels Oct 10, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

auto no_split = [&]() -> bool {
begin_scan_keys.emplace_back();
begin_scan_keys.back().add_value(
cast_to_string<primitive_type, CppType>(get_range_min_value(), scale()),
contain_null());
end_scan_keys.emplace_back();
end_scan_keys.back().add_value(
cast_to_string<primitive_type, CppType>(get_range_max_value(), scale()));
cast_to_string<primitive_type, CppType>(get_range_max_value(), scale()),
empty_range_only_null ? true : false);
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: redundant boolean literal in ternary expression result [readability-simplify-boolean-expr]

Suggested change
empty_range_only_null ? true : false);
static_cast<bool>(empty_range_only_null));

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Oct 10, 2024
Copy link
Contributor

PR approved by at least one committer and no changes requested.

Copy link
Contributor

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 37.41% (9660/25825)
Line Coverage: 28.69% (80170/279471)
Region Coverage: 28.11% (41441/147415)
Branch Coverage: 24.71% (21105/85400)
Coverage Report: http://coverage.selectdb-in.cc/coverage/5215135fb97c68f69d3513f949f57ed09629485d_5215135fb97c68f69d3513f949f57ed09629485d/report/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.0.x dev/2.1.x dev/3.0.x kind/fix Categorizes issue or PR as related to a bug. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants