Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: DDL includes unsupported parameter passed as postgresql_* #937

Open
1 task done
jobh opened this issue Apr 8, 2024 · 2 comments
Open
1 task done

[Bug]: DDL includes unsupported parameter passed as postgresql_* #937

jobh opened this issue Apr 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jobh
Copy link

jobh commented Apr 8, 2024

What happened?

I have a table definition with an explicit index

        Index("ix_track_id_covering", id, unique=True,
              postgresql_include=["mmsi", "from_timestamp", "to_timestamp"]),

where the INCLUDE directive should only be generated on postgresql.

With duckdb_engine, I get an error:

E               sqlalchemy.exc.ProgrammingError: (duckdb.duckdb.ParserException) Parser Error: syntax error at or near "INCLUDE"
E               [SQL: CREATE UNIQUE INDEX ix_track_id_covering ON track (id) INCLUDE (mmsi, from_timestamp, to_timestamp)]

which indicates that postgresql_include is not ignored as it should.

DuckDB Engine Version

0.11.2

DuckDB Version

0.10.1

SQLAlchemy Version

1.4.48

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jobh jobh added the bug Something isn't working label Apr 8, 2024
@jobh
Copy link
Author

jobh commented Apr 8, 2024

Similar issue for

postgresql_ops={"destination": "varchar_pattern_ops"})

with error

E               sqlalchemy.exc.NotSupportedError: (duckdb.duckdb.NotImplementedException) Not implemented Error: Index with opclass not supported yet!
E               [SQL: CREATE INDEX ix_voyage_destination ON voyage (destination varchar_pattern_ops)]

@jobh
Copy link
Author

jobh commented Apr 8, 2024

...and

    __table_args__ = (
        {
            "postgresql_partition_by": "RANGE (moving, num_idx)",
        },
    )

E               sqlalchemy.exc.ProgrammingError: (duckdb.duckdb.ParserException) Parser Error: syntax error at or near "PARTITION"

@jobh jobh changed the title [Bug]: Index DDL includes unsupported parameter passed as postgresql_include [Bug]: DDL includes unsupported parameter passed as postgresql_* Apr 8, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants