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

chore(query): fix order for scalar cmp with null #15145

Merged
merged 4 commits into from Apr 1, 2024

Conversation

sundy-li
Copy link
Member

@sundy-li sundy-li commented Apr 1, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

By default, null is biggest than other values in databend. So we enable Scalar::Null compare with other none null scalars.

  • Fixes #[Link the issue here]

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

@github-actions github-actions bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Apr 1, 2024
@sundy-li sundy-li requested a review from xudong963 April 1, 2024 03:12
@sundy-li
Copy link
Member Author

sundy-li commented Apr 1, 2024

Bug in main for merge join, because it did not consider about null

drop table if exists t1;

drop table if exists t2;

create table t1(a int null);

insert into t1 values(1), (NULL), (2);

create table t2(b int null);

insert into t2 values(1), (NULL), (3);

select * from t1 join t2 on t1.a <= t2.b order by t1.a;

@BohuTANG BohuTANG merged commit f5478ff into datafuselabs:main Apr 1, 2024
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-chore this PR only has small changes that no need to record, like coding styles.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants