Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Early transformation of monadic joins into applicative joins.
- A new compiler phase `rewriteJoins`, which runs directly after `flattenProjections`, converts all monadic joins into applicative joins. In its current state it is good enough to pass all tests. The implementation is much simpler than the old one in `fuseComprehensions` (the AST is still purely functional at this point) and should be easy to extend to cover more cases. - A new compiler phase `verifySymbols` runs after `rewriteJoins` to check that all joins have been properly rewritten and that all references are reachable. When a join could not be transformed, this will fail with a useful error message instead of producing invalid SQL code. - `createResultSetMapping` is now run at the end of the standard phases. It uses the original result type stored by the new `removeMappedTypes` phase, thus keeping the AST free of the client-side parts until the point where they actually match the server side. - `fuseComprehensions` requires a small change to translate aggregations arising from `rewriteJoins`. This is only to make it work for now. The whole phase needs to be rewritten from scratch. - Better code generator for explicit join syntax. The default in JdbcStatementBuilderComponent implements the standard SQL syntax. MySQL, SQLite and Hsqldb require special handling (in particular Hsqldb, which does not support arbitrary nesting on the RHS of a join).
- Loading branch information
Showing
24 changed files
with
525 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.