Incorrect Results for FULL/RIGHT OUTER JOIN with generate_series()
(1) By orange (20030618) on 2025-03-18 18:46:31 [source]
Test Case: Create Test Table and Insert Sample Data: CREATE TABLE t1 ( value integer ); INSERT INTO t1 VALUES (1),(2),(3); Query1: select ref_1.value as c_0, ref_2.value as c_1 from (t1 as ref_1 full outer join generate_series(1, 3, 1) as ref_2 on (ref_1.value = ref_2.value )); Expected Result: 1|1 2|2 3|3 Actual Result: 1|1 2|2 3|3 |2 |3 Query2: select ref_1.value as c_0, ref_2.value as c_1 from (t1 as ref_1 right outer join generate_series(1, 3, 1) as ref_2 on (ref_1.value = ref_2.value )); Expected Result: 1|1 2|2 3|3 Actual Result: 1|1 2|2 3|3 |2 |3 SQLite Version: 3.50.0 2025-03-12 15:17:13 6ec0c03b954cf705da076d035a1cc2e784233ae28857385379e44a59af6c5ec4 (64-bit)
(2) By Richard Hipp (drh) on 2025-03-18 20:23:11 in reply to 1 [link] [source]
Fixed by check-in 202503182015Z.