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

feat(api): add to_sqlglot method to Schema objects #10063

Merged
merged 8 commits into from
Sep 9, 2024

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Sep 9, 2024

Consolidate code to turn Ibis schemas into sqlglot objects under a Schema.to_sqlglot method.

@cpcloud cpcloud added the refactor Issues or PRs related to refactoring the codebase label Sep 9, 2024
@cpcloud cpcloud requested review from jcrist and gforsyth September 9, 2024 11:30
ibis/backends/sql/compilers/base.py Show resolved Hide resolved
@cpcloud
Copy link
Member Author

cpcloud commented Sep 9, 2024

Checking the clouds now.

@cpcloud
Copy link
Member Author

cpcloud commented Sep 9, 2024

Clouds are passing now:

❯ pytest -m snowflake -n 8 --dist loadgroup --snapshot-update -q && pytest -m bigquery -n auto --dist loadgroup --snapshot-update -q
bringing up nodes...
x.....x............x............................x.......x...x.......................x.................x.............xx..x.x....................x................s............xxxxxxxxxx..x.x............ [ 10%]
............x...........x..................x........x.........x.......xx...xxxxx....xxxxxx..xxx.xx.xx....x.x...x.x.x...xxxx...xxxx.xx...x.xx....x.xxxxxxxxx...x..x.....x...x..xx.xx.xx...x..xxx.....xx.. [ 20%]
...x....x..x........x..x.x....x....x.............x.x.....x......................x.....x.................x...............x........x....................................xx.....x.x..........x.....x.....x. [ 31%]
............x......x.x........................x.....x....................x.x............x.x........................x...............x.....x.......x..............x..................................x.... [ 41%]
..........sx....x...x.............................................................x........x..............................................x.xx..x....................................................... [ 52%]
..x.x.............x........x.......xx..........................xx......................xx...........x........x..........x..xx....x......................x.x............................................. [ 62%]
....x.........x...............................................................x...x...............x.............x........x.........x.....x.....x......x.x............x.......................s.......... [ 73%]
...x.....x...x.....xx....x.........x..xx..x......x....x..x.................x..x....x......x............x.......x......x.......x..........x.x.x.....x......................x.................x........... [ 83%]
................s......s...............s.xx.xx.x..x...xxxx.xxx.x..x.......x..xx....xx....s.xxx...x.............x....s.........................................s......................................... [ 94%]
...................................................................................s.........................                                                                                            [100%]
1675 passed, 10 skipped, 224 xfailed in 224.24s (0:03:44)
bringing up nodes...
x...x......x...xxxx.xxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxx.x.x.xx.........x.xxxxx..x.x.xxx...xx..x..x...x....sssssssss [  9%]
ssssss.sssssssssssssssxsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss..x......x..x.x.x..x.........................x..x.x........x...........sssssssssssssssssssss................ [ 18%]
.......x..xx...............x............x.......x.x..x..x....x.....x..........x.....................................xxx......x................x.....x...............x........x..x....xx.....x........x.. [ 28%]
.....xx..x..x................x..x...x....x...........x.xx.....xxxx...x.........xxx..x....x...x..s..........x.....xx.x..................x.xx.....x..................x.......................x............ [ 37%]
.....x...........................................................................x.............x......x...................x....x........x.......x............................x......xx..xx.x..x......... [ 46%]
.........x.........x..x....x...xxx..x..x........................x....xx................x....x......x.......x........x........x...x.................x............x...........x......x..x........x.xxxxxxx [ 56%]
x....x.........x..xxxx.x.x......x.x.xxxxx.x.xx.....x...........xx..xx.xxx....Xxx........x..x......x..x.x....x......X...x...........X.xX...x.x.....x.....x........Xxx.xx...xx..x..x..x.x.........xx..xx.. [ 65%]
......x...x....s...x........x.............x..x........................s....................x.....ss...............x...x.......x.......x.....x..s.....x......x........s....x....x..x.....x......xxx.x.... [ 74%]
.x.x....x.......x..............................x...................................................s.................................................................................................... [ 84%]
.........................x.x.....x..........x........................................................................................................................................................... [ 93%]
....................................................................x.....................................................................                                                               [100%]
1662 passed, 128 skipped, 343 xfailed, 5 xpassed in 254.23s (0:04:14)

@cpcloud
Copy link
Member Author

cpcloud commented Sep 9, 2024

Going to merge this next, since it will create conflicts with some other PRs.

@cpcloud cpcloud enabled auto-merge (squash) September 9, 2024 15:19
@cpcloud cpcloud merged commit 9488115 into ibis-project:main Sep 9, 2024
81 checks passed
@cpcloud cpcloud deleted the compile-schemas branch September 9, 2024 15:35
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants