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

refactor(sql): make compilers usable with a base install #9766

Merged

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Aug 4, 2024

This PR makes our compilers usable without having any backend dependencies installed.

The main goal is to make ibis.to_sql avoid hitting any backend dependencies.

The approach here is to move all sqlglot-ifcation, including

  • transforms related to output, like geospatial (e.g., duckdb) an boolean workarounds (e.g., mssql)
  • UDF compilation

entirely into the compilers.

One benefit of this is that now the output of ibis.to_sql and the output of con.compile will actually match. Previously, they would only match when the expression was attached to a backend.

@cpcloud cpcloud added the refactor Issues or PRs related to refactoring the codebase label Aug 4, 2024
@cpcloud cpcloud force-pushed the transform-in-compilers-instead-of-backend branch 2 times, most recently from 1ccdf78 to 9e9ec9a Compare August 4, 2024 15:54
@cpcloud cpcloud added the sql Backends that generate SQL label Aug 4, 2024
@cpcloud cpcloud force-pushed the transform-in-compilers-instead-of-backend branch from 0ae0117 to ef21fbc Compare August 4, 2024 17:21
@cpcloud cpcloud force-pushed the transform-in-compilers-instead-of-backend branch from 50c43d5 to 4cf502a Compare August 5, 2024 10:57
@cpcloud cpcloud requested review from jcrist and gforsyth August 5, 2024 10:57
@cpcloud cpcloud force-pushed the transform-in-compilers-instead-of-backend branch from e14cd29 to cd73de1 Compare August 5, 2024 11:13
@cpcloud
Copy link
Member Author

cpcloud commented Aug 5, 2024

cc @jonmmease

This PR makes ibis.to_sql work with a base installation.

It'll be available in 9.3, which we should be releasing this week!

@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@cpcloud cpcloud added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 5, 2024
✅ sum(x) over (order by y desc nulls last)
🚫 sum(x) over (order by y asc nulls last)
✅ sum(x) over (order by y asc nulls first)
🚫 sum(x) over (order by y desc nulls first)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unicode in comments is not something I would have thought of, but is kinda nice.

@cpcloud cpcloud added this to the 9.3 milestone Aug 5, 2024
@cpcloud cpcloud merged commit 84a786d into ibis-project:main Aug 5, 2024
89 checks passed
@cpcloud cpcloud deleted the transform-in-compilers-instead-of-backend branch August 5, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Issues or PRs related to refactoring the codebase sql Backends that generate SQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants