-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: incorrect overlap checking (replace into) (#15315)
* fix: incorrect overlap checking (replace into) should return false if column being checked has no range index. * revert default query node config * add logic test * chore: tweak code comments
- Loading branch information
1 parent
8c34082
commit 9c43f7c
Showing
2 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
tests/sqllogictests/suites/base/09_fuse_engine/09_0024_replace_into_issue_15307.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
statement ok | ||
DROP DATABASE IF EXISTS issue_15307 | ||
|
||
statement ok | ||
CREATE DATABASE issue_15307 | ||
|
||
statement ok | ||
USE issue_15307 | ||
|
||
# https://github.com/datafuselabs/databend/issues/15307 | ||
|
||
statement ok | ||
create or replace table t( c1 bool); | ||
|
||
statement ok | ||
replace into t on(c1) values(false); | ||
|
||
statement ok | ||
replace into t on(c1) values(false); | ||
|
||
# there should be only one row left there | ||
query I | ||
select count() from t; | ||
---- | ||
1 | ||
|
||
# let's insert a different bool value | ||
statement ok | ||
replace into t on(c1) values(true); | ||
|
||
query I | ||
select count() from t; | ||
---- | ||
2 | ||
|
||
statement ok | ||
drop table t; | ||
|
||
statement ok | ||
DROP DATABASE issue_15307 |