We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The incorrect syntax of the full join is generated: "FULL LEFT OUTER JOIN".
To Reproduce
from clickhouse_sqlalchemy.drivers.base import clickhouse_dialect from clickhouse_sqlalchemy.ext.declarative import ClickHouseDeclarativeMeta from sqlalchemy import Integer, Column, select from sqlalchemy.orm import declarative_base Base = declarative_base(metaclass=ClickHouseDeclarativeMeta) class Left(Base): __tablename__ = 'left_table' id = Column(Integer, primary_key=True) class Right(Base): __tablename__ = 'right_table' id = Column(Integer, primary_key=True) stmt = select(Left).outerjoin(Right, Left.id == Right.id, full=True) compiled = stmt.compile(dialect=clickhouse_dialect) print(compiled)
SELECT left_table.id FROM left_table FULL LEFT OUTER JOIN right_table ON left_table.id = right_table.id
Expected behavior
SELECT left_table.id FROM left_table FULL OUTER JOIN right_table ON left_table.id = right_table.id
Versions
The text was updated successfully, but these errors were encountered:
Temporary fix:
class FixedClickHouseSQLCompiler(ClickHouseSQLCompiler): def visit_join(self, join: Any, asfrom: bool = False, **kwargs: Any) -> str: return super().visit_join(join, asfrom, **kwargs).replace('FULL LEFT OUTER JOIN', 'FULL OUTER JOIN') class FixedClickHouseDialect(ClickHouseDialect): statement_compiler = FixedClickHouseSQLCompiler clickhouse_dialect = FixedClickHouseDialect()
Sorry, something went wrong.
fix: full join support (closes xzkostyan#193)
38b0cef
Merge pull request #196 from poofeg/193-fix-full-join-support
7848994
fix: full join support (closes #193)
Successfully merging a pull request may close this issue.
Describe the bug
The incorrect syntax of the full join is generated: "FULL LEFT OUTER JOIN".
To Reproduce
Expected behavior
Versions
The text was updated successfully, but these errors were encountered: