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

Optionally relax sqlglot / ibis pin via env var for use in SQLMesh #942

Open
z3z1ma opened this issue Aug 30, 2024 · 3 comments
Open

Optionally relax sqlglot / ibis pin via env var for use in SQLMesh #942

z3z1ma opened this issue Aug 30, 2024 · 3 comments
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@z3z1ma
Copy link

z3z1ma commented Aug 30, 2024

"sqlglot >=20.8.0,<=20.11",

There is very strong synergy between bigframes and https://github.com/TobikoData/sqlmesh
However because of the sqlglot pin and the transitive sqlglot pin in the ibis pin, this library is incompatible with sqlmesh. (sqlmesh is built and maintained by creators of sqlglot and therefore usually has latest pin, and a strict one at that)

Since you are using setup.py, we should be able to use an env var or something similar to have an opt-in way to remove the version constraints on those two deps such that they can be defined by the consumer. We would accept that it opens one up to undefined behavior but by contrast it frees you from needing to constantly update your pins and allows more experimentation and adoption in the community.

You can see an example sqlmesh model using bigframes here https://github.com/TobikoData/sqlmesh/pull/2667/files

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Aug 30, 2024
@tswast tswast added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Aug 30, 2024
@tswast
Copy link
Collaborator

tswast commented Aug 30, 2024

Since you are using setup.py, we should be able to use an env var or something similar to have an opt-in way to remove the version constraints on those two deps such that they can be defined by the consumer.

Do you have an example of another package using an environment variable for this purpose?

I'm personally a bit wary of of relaxing these pins without having fully tested against such versions, but an opt-in mechanism for folks who know what they are doing seems acceptable. Happy to accept a pull request if you want to mail something. :-)

P.S. We're actively working on an ibis (and sqlglot) upgrade in #827. There's quite a bit that breaks in ibis 9.x, so our wariness is definitely warranted. It's quite likely that we'll end up "vendoring" much of the ibis package so that this kind of thing (relaxing ibis versions, or even removing ibis as a pip dependency altogether) will become much more feasible.

@rubenvereecken
Copy link

We'd love this too.

@chelsea-lin
Copy link
Contributor

the SQLGlot version has been updated to sqlglot >=23.6.3,<25.2 as part of the #827 merge, though it was still pined with a maximum version to align with ibis framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants