8000 Put the ON conditions of nested joins where Access puts them by dominion525 · Pull Request #125 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content

Put the ON conditions of nested joins where Access puts them - #125

Merged
dominion525 merged 2 commits into
mainfrom
fix/join-conditions-in-nested-joins
Oct 24, 2026
Merged

dominion525 merged 2 commits into
mainfrom
fix/join-conditions-in-nested-joins

Conversation

@dominion525
Copy link
Copy Markdown
Owner

Summary

  • When two tables were already inside one join, build_from_tables looked only at the outermost join that holds both. If its join type differed from the new condition, the condition was dropped without a word; if it matched, the condition went on that outer join.
  • Access puts such a condition on the innermost join that holds both tables, whatever the type of the joins around it. This was checked against the SQL view of Access for four queries of Sports.accdb.
  • Statistics-Age Champion lost three conditions of Heats and CompEvents; All Points, CompetitorsSubform2 and Stats_%_Pts had theirs on the outer join. Of the 172 queries of the test data, these four are the only ones whose SQL changes.
  • A condition is now added to the innermost join of both tables, and a warning is logged instead of dropping it silently when the join types still differ.
  • A test compares the FROM clause of the four queries with the SQL view of Access, and the fix is in the changelog.

🤖 Generated with Claude Code

dominion525 and others added 2 commits October 24, 2026 17:59
…les, where Access puts them

- Add a join condition of two tables that are already inside one join to the innermost join that holds both
- Only the outermost join was looked at, and a condition was dropped silently when its type differed, which lost three conditions of Statistics-Age Champion of Sports.accdb
- Warn instead of dropping it silently when the join types still differ
- Test the FROM clause of four queries of Sports.accdb against the SQL view of Access

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…0.4.0

- Add to Fixed in the English and Japanese changelogs that join conditions were left out of the SQL, or put elsewhere than Access puts them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Coverage

For 07459ab.

Filename                       Regions    Missed Regions     Cover   Functions  Missed Functions  Executed       Lines      Missed Lines     Cover    Branches   Missed Branches     Cover
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
jetdb-cli/src/export.rs            108                11    89.81%           5                 0   100.00%          66                 6    90.91%           0                 0         -
jetdb-cli/src/form.rs              254                24    90.55%          19                 5    73.68%         152                 9    94.08%           0                 0         -
jetdb-cli/src/macro_cmd.rs         151                11    92.72%          11                 2    81.82%          81                 5    93.83%           0                 0         -
jetdb-cli/src/main.rs              864                38    95.60%          70                 2    97.14%         549                25    95.45%           0                 0         -
jetdb-cli/src/prop.rs              308                15    95.13%          33                 2    93.94%         186                10    94.62%           0                 0         -
jetdb-cli/src/query.rs              80                 4    95.00%           5                 0   100.00%          51                 1    98.04%           0                 0         -
jetdb-cli/src/vba.rs                74                 4    94.59%           5                 0   100.00%          47                 1    97.87%           0                 0         -
jetdb-wasm/src/lib.rs             3841                95    97.53%         246                 4    98.37%        2009                22    98.90%           0                 0         -
jetdb/src/catalog.rs               531                14    97.36%          41                 0   100.00%         304                 7    97.70%           0                 0         -
jetdb/src/complex.rs               917                32    96.51%          73                 0   100.00%         607                15    97.53%           0                 0         -
jetdb/src/crypto.rs               2284               210    90.81%         105                21    80.00%        1301               169    87.01%           0                 0         -
jetdb/src/csv.rs                   810                23    97.16%          65                 0   100.00%         453                 6    98.68%           0                 0         -
jetdb/src/data.rs                 4523               176    96.11%         246                 2    99.19%        2509               109    95.66%           0                 0         -
jetdb/src/ddl/access.rs             70                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/mod.rs              2777                 8    99.71%         199                 2    98.99%        1510                 6    99.60%           0                 0         -
jetdb/src/ddl/mysql.rs              70                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/postgres.rs           71                 0   100.00%           7                 0   100.00%          46                 0   100.00%           0                 0         -
jetdb/src/ddl/sqlite.rs             69                 0   100.00%           7                 0   100.00%          48                 0   100.00%           0                 0         -
jetdb/src/encoding.rs              284                 0   100.00%          30                 0   100.00%         153                 0   100.00%           0                 0         -
jetdb/src/file.rs                 1947                67    96.56%         107                 0   100.00%        1021                26    97.45%           0                 0         -
jetdb/src/form.rs                 3253               150    95.39%         227                10    95.59%        1775                69    96.11%           0                 0         -
jetdb/src/form2000.rs              762                21    97.24%          56                 1    98.21%         402                 4    99.00%           0                 0         -
jetdb/src/format.rs                620                 2    99.68%          41                 0   100.00%         408                 2    99.51%           0                 0         -
jetdb/src/lib.rs                     3                 0   100.00%           1                 0   100.00%           3                 0   100.00%           0                 0         -
jetdb/src/macro_action.rs          299                19    93.65%          27                 3    88.89%         163                24    85.28%           0                 0         -
jetdb/src/macro_def.rs            2280                98    95.70%         171                 9    94.74%        1517                46    96.97%           0                 0         -
jetdb/src/macro_text.rs            756                24    96.83%          47                 2    95.74%         426                20    95.31%           0                 0         -
jetdb/src/map.rs                   416                13    96.88%          27                 0   100.00%         221                 5    97.74%           0                 0         -
jetdb/src/money.rs                 286                 0   100.00%          26                 0   100.00%         189                 0   100.00%           0                 0         -
jetdb/src/prop.rs                 1413                55    96.11%          88                 8    90.91%         746  
A1A8
              63    91.55%           0                 0         -
jetdb/src/query.rs                2705                78    97.12%         184                 0   100.00%        1682                38    97.74%           0                 0         -
jetdb/src/relationship.rs          302                27    91.06%          12                 0   100.00%         187                17    90.91%           0                 0         -
jetdb/src/save_as_text.rs          574                27    95.30%          52                 3    94.23%         341                27    92.08%           0                 0         -
jetdb/src/storage.rs               571                46    91.94%          23                 1    95.65%         318                24    92.45%           0                 0         -
jetdb/src/table.rs                1594                65    95.92%          94                 2    97.87%         948                21    97.78%           0                 0         -
jetdb/src/timestamp.rs             413                 0   100.00%          43                 0   100.00%         232                 0   100.00%           0                 0         -
jetdb/src/vba.rs                   634                65    89.75%          54                16    70.37%         361                60    83.38%           0                 0         -
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TOTAL                            36914              1422    96.15%        2461                95    96.14%       21104               837    96.03%           0                 0         -

@dominion525
dominion525 merged commit 77f2466 into main Oct 24, 2026
11 checks passed
@dominion525
dominion525 deleted the fix/join-conditions-in-nested-joins branch October 24, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0