CREATE TABLE test_join_used_flags (i64 Int64, i32 Int32) ENGINE = Memory
INSERT INTO test_join_used_flags SELECT number AS i64, rand32() AS i32 FROM numbers_mt(1500000)
SELECT l.i64, r.i64, l.i32, r.i32 FROM test_join_used_flags l RIGHT JOIN test_join_used_flags r USING i64 format Null
DROP TABLE IF EXISTS test_join_used_flags