Skip to content
New issue

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

Support with_hint for tables #150

Open
c-thiel opened this issue Aug 14, 2024 · 0 comments
Open

Support with_hint for tables #150

c-thiel opened this issue Aug 14, 2024 · 0 comments

Comments

@c-thiel
Copy link

c-thiel commented Aug 14, 2024

with_hint currently seems to be not supported.
The following snippet raises an assertion error:

from sqlalchemy import table, column, select
import ibm_db_sa

users = table("users", column("a"))
dialect = ibm_db_sa.dialect()

q = (
    select(users)
    .select_from(users)
    .where(users.c.a == 1)
    .with_hint(
        users,
        "FOR SYSTEM_TIME BETWEEN '0001-01-01-00.00.00.000000' AND '9999-12-31-00.00.00.000000'",
    )
)
q_hist = q.compile(dialect=dialect)
print(q_hist)
assert "FOR SYSTEM_TIME BETWEEN" in str(q_hist)

Is there any known workaround or plan to implement it?

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

No branches or pull requests

1 participant