## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.timer 192319231923
.width -(pi() + '' || ('true')) -(ifnull(jsonb_remove(substr(1.7976931348623157e+308, -2, 1), '$.key'), 2) + 0.0) -3
.open
ATTACH DATABASE (':memory:' || '') AS aux76;
-- -separator ","

CREATE /**/ TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a OrDEr BY c DESC) AS d FROM T;
SELECT * FROM T AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
REINDEX;
INSERT OR IGNORE INTO T VALUES ('', '', '');
ANALYZE T;
INSERT OR IGNORE INTO T VALUES ('', NULL, -3);
VACUUM main;
.width -(pi() + '' || ('true')) -(2 + 0.0) -3
.open
ATTACH DATABASE (':memory:' || '') AS aux76;
-- -separator ","

CREATE /**/ TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a OrDEr BY c DESC) AS d FROM T;
SELECT * FROM T AS a RIGHT OUTER JOIN T AS b ON a.rowid = b.rowid;
DETACH DATABASE aux76;
REINDEX;
INSERT OR IGNORE INTO T VALUES ('', '', '');
ANALYZE T;
INSERT OR IGNORE INTO T VALUES ('', NULL, -3);
VACUUM main;


```

## Actual output

```sql
Run Time: real 0.000 user 0.000187 sys 0.000000
Run Time: real 0.001 user 0.000088 sys 0.000000
Run Time: real 0.000 user 0.000019 sys 0.000000
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
Run Time: real 0.000 user 0.000122 sys 0.000000
a|b|5.0|a|b|5.0
a|c|5.0|a|c|5.0
b|d|-8.25|b|d|-8.25
Run Time: real 0.000 user 0.000069 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.000 user 0.000003 sys 0.000000
Run Time: real 0.000 user 0.000010 sys 0.000000
Run Time: real 0.000 user 0.000068 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.000 user 0.000210 sys 0.000000
Run Time: real 0.000 user 0.000042 sys 0.000000
Run Time: real 0.000 user 0.000036 sys 0.000000
Run Time: real 0.000 user 0.000014 sys 0.000000
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
Run Time: real 0.000 user 0.000072 sys 0.000000
a|b|5.0|a|b|5.0
a|c|5.0|a|c|5.0
b|d|-8.25|b|d|-8.25
Run Time: real 0.000 user 0.000049 sys 0.000000
Run Time: real 0.000 user 0.000005 sys 0.000000
Run Time: real 0.000 user 0.000002 sys 0.000000
Run Time: real 0.000 user 0.000007 sys 0.000000
Run Time: real 0.000 user 0.000051 sys 0.000000
Run Time: real 0.000 user 0.000006 sys 0.000000
Run Time: real 0.001 user 0.000171 sys 0.000000
```

## Expectation

```sql
Run Time: real 0.000084 user 0.000094 sys 0.000000
Run Time: real 0.000058 user 0.000058 sys 0.000000
Run Time: real 0.000022 user 0.000022 sys 0.000000
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
Run Time: real 0.000118 user 0.000118 sys 0.000000
a|b|5.0|a|b|5.0
a|c|5.0|a|c|5.0
b|d|-8.25|b|d|-8.25
Run Time: real 0.000073 user 0.000073 sys 0.000000
Run Time: real 0.000005 user 0.000006 sys 0.000000
Run Time: real 0.000001 user 0.000001 sys 0.000000
Run Time: real 0.000008 user 0.000008 sys 0.000000
Run Time: real 0.000056 user 0.000057 sys 0.000000
Run Time: real 0.000005 user 0.000006 sys 0.000000
Run Time: real 0.000174 user 0.000174 sys 0.000000
Run Time: real 0.000028 user 0.000028 sys 0.000000
Run Time: real 0.000025 user 0.000027 sys 0.000000
Run Time: real 0.000010 user 0.000010 sys 0.000000
a|b|5.0|1
a|c|5.0|1
b|d|-8.25|1
Run Time: real 0.000040 user 0.000040 sys 0.000000
a|b|5.0|a|b|5.0
a|c|5.0|a|c|5.0
b|d|-8.25|b|d|-8.25
Run Time: real 0.000051 user 0.000051 sys 0.000000
Run Time: real 0.000003 user 0.000004 sys 0.000000
Run Time: real 0.000001 user 0.000002 sys 0.000000
Run Time: real 0.000005 user 0.000005 sys 0.000000
Run Time: real 0.000035 user 0.000035 sys 0.000000
Run Time: real 0.000004 user 0.000005 sys 0.000000
Run Time: real 0.000109 user 0.000110 sys 0.000000
```

## Flag

```
-readonly
```

