Problems encountered when using the right join elt function together
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
Table building statement:
CREATE TABLE t0(c0 BOOL ZEROFILL CHECK (CAST(c0 AS CHAR)) DEFAULT NULL ) AUTO_ID_CACHE 100 ;
CREATE TABLE t1 LIKE t0;
UPDATE t0 SET c0='';
set @@tidb_index_lookup_join_concurrency=24;
UPDATE t1 SET c0='T' WHERE ((960554197)<(1891121875));
ALTER TABLE t1 ORDER BY c0 DESC;
CREATE VIEW v0(c0) AS SELECT -6.17552593E8 FROM t0 WHERE ((NULL)REGEXP((CASE (('{')>=(CAST((NOT ('-519386198')) AS DATE))) WHEN (((((~ (NULL))) IS NOT NULL))NOT REGEXP(((t0.c0)LIKE(CAST(t0.c0 AS CHAR))))) THEN ELT('&tc>', true) ELSE FIELD(NULL, -2102583696) END ))) ORDER BY CAST(-1805859464 AS DECIMAL);
TRUNCATE t0;
ALTER TABLE t0 ADD PRIMARY KEY(c0);
UPDATE t1 SET c0=-1715911751;
set @@tidb_opt_join_reorder_threshold=0;
INSERT LOW_PRIORITY IGNORE INTO t0 VALUES ('');
ALTER TABLE t1 CHANGE c0 c0 BOOL NOT NULL ;
UPDATE t1 SET c0=702875037 WHERE t1.c0;
set @@tidb_index_lookup_join_concurrency=1;
Statement that triggers a bug:
SELECT v0.c0,t0.c0 FROM v0 RIGHT JOIN t0 ON t0.c0 WHERE ((ELT(t0.c0, 'e', NULL, ((v0.c0) IS NULL))) IS NULL);
### 2. What did you expect to see? (Required)
Return a piece of data [null,0]
### 3. What did you see instead (Required)
No data returned
### 4. What is your TiDB version? (Required)
6.6.0
Contributor guide
Assessment
This issue has not been assessed yet.