Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Simplify: Squash database-specialised mixins into their database-specialised dialects #751

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

nolar
Copy link
Contributor

@nolar nolar commented Oct 24, 2023

Little improvements step by step:

This time, squash the database-specialised mixins into their corresponding database-specialised dialects — since these mixins are not reused anywhere else.

In particular, resolve the Postgres-Redshift & Presto-Trino pairs with double inheritance of the same methods (first, inherited from the parent dialect class; second, inherited from the parent mixins, which are already included in the parent dialect class).

This PR does NOT touch the "abstract" mixins yet — to be made later (they are not currently included in the base Dialect class, so this change will need extra care).

Reviewer hints: There are no changes in the code & logic itself, but only moves of methods up & down between classes. The big green & red diffs are there because of how git & GitHub detect such changes.

Sergey Vasilyev added 3 commits October 24, 2023 15:38
All the Presto mixins are already inherited into the Trino dialect via its base class, so there is no need to duplicate the mixins.
All the Postgres mixins are already inherited into the Redshift dialect via its base class, so there is no need to duplicate the mixins.
@nolar nolar requested review from dlawin and vvkh October 24, 2023 13:47
@nolar nolar merged commit 3bc08e2 into master Oct 25, 2023
@nolar nolar deleted the squash-specialised-mixins branch October 25, 2023 10:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants