Example 4: three-way-join (a LEFT JOIN b ON TRUE JOIN c on FALSE), the left join condition is completely erased, but the code still jump immediately to halt because of the always-false inner join condition:
This is OK I guess, but I noticed that SQLite immediately jumps to Halt even before OpenRead if it can, maybe we should also write it that way... the only consideration that you can only do that on constant-false conditions that are in a WHERE or an INNER JOIN.
Example 1: jump immediately to halt when WHERE is always false
Example 2: don't emit a conditional when WHERE is always true
Example 3: in LEFT JOIN inner loop, jump immediately to setting the right cursor to null when the join condition is always false
Example 4: three-way-join (a LEFT JOIN b ON TRUE JOIN c on FALSE), the left join condition is completely erased, but the code still jump immediately to halt because of the always-false inner join condition:
This is OK I guess, but I noticed that SQLite immediately jumps to
Halt
even beforeOpenRead
if it can, maybe we should also write it that way... the only consideration that you can only do that on constant-false conditions that are in a WHERE or an INNER JOIN.