-
Notifications
You must be signed in to change notification settings - Fork 0
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
Overhaul BACK and CALC to use downstreaming of aliases and add CALCULATE method #256
Merged
Merged
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
096c752
started mass renaming and addition of the ancestral mapping
knassre-bodo 19315f8
Fixing imports, allowing reuse-under-same-name uses
knassre-bodo 580315a
Cleaning up some tests and error handling to allow non-renaming accesses
knassre-bodo 4cb488f
Adjusting how the ancestral mapping works
knassre-bodo 6c5ff8e
Working on purge of back reference collection
knassre-bodo 0e71711
Begining massive purge rename of () to .CALCULATE()
knassre-bodo 7100472
Continuing renaming purge
knassre-bodo ae7dacc
Continuing the back/calc rename purge
knassre-bodo f32de87
Continued fixing exploration, updated all_terms handling, fixing part…
knassre-bodo b5fa65e
Hybrid handling for new BACK semantics, need to fix partition handing…
knassre-bodo b80205d
Working on hybrid partition cases, all queries working except q11 wit…
knassre-bodo 42acc02
Fixing extreme edge case bug
knassre-bodo aee583f
Resolving merge conflicts
knassre-bodo 4307846
Fixing defog functions
knassre-bodo 2942171
Cleanup of correlate avoiding case [RUN CI]
knassre-bodo 9aa294a
updated core spec docs, need to finish updating notebooks to purge ol…
knassre-bodo 1beb081
[RUN CI]
knassre-bodo ddd8d3b
Added to_sql and to_df keyword argument for columns
knassre-bodo c2084d0
Testing to_sql with columns arg
knassre-bodo fee822f
Added to_df tests
knassre-bodo 09372ab
Updating usage doc [RUN CI]
knassre-bodo 9a867fb
Revising notebooks [RUN CI]
knassre-bodo b465a34
Fixing typo
knassre-bodo 20bfd0b
more doc fixes
knassre-bodo 12e85e9
Resolving massive conflits after pulling in big changes from main, ne…
knassre-bodo 07493bb
Fixed most of the correlation bugs
knassre-bodo afb332b
Fixed partition as child bugs with backreferences as keys, need to de…
knassre-bodo a4f5ed8
Fixed partition as child bugs with backreferences as keys, need to de…
knassre-bodo c627001
Fixing remaining correlation issues [RUN CI]
knassre-bodo 6fc42b3
Added Hadia's initial quick fixes
knassre-bodo 8b0aff9
Getting remaining tests online [RUN CI]
knassre-bodo a8e604c
Merge remote-tracking branch 'origin/kian/back_overhaul' into kian/ba…
knassre-bodo ac26ece
Further revisions
knassre-bodo 588501e
Update pydough/conversion/relational_converter.py
knassre-bodo 4b81f1b
Making agg join keys deterministically sorted
knassre-bodo 68f614c
Merge remote-tracking branch 'origin/kian/back_overhaul' into kian/ba…
knassre-bodo 2502a97
Overhaul to how partition child handles backrefs to reconcile convolu…
knassre-bodo 764e134
Added one more extreme edge case for the partition child behavior [RU…
knassre-bodo 8c155e5
Resolving conflicts [RUN CI]
knassre-bodo 2fe4d4d
Revising notebooks [RUN CI]
knassre-bodo 8c70a13
Revisions [RUN CI]
knassre-bodo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,7 @@ venv/ | |
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
.vscode | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,7 +101,7 @@ | |
"source": [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least 1 reviewer should re-run all 5 notebooks to confirm they behave as expected. |
||
"%%pydough\n", | ||
"\n", | ||
"nations(key, name)" | ||
"nations.CALCULATE(nkey=key, nname=name)" | ||
] | ||
}, | ||
{ | ||
|
@@ -121,7 +121,7 @@ | |
"source": [ | ||
"%%pydough\n", | ||
"\n", | ||
"nation_keys = nations(key, name)" | ||
"nation_keys = nations.CALCULATE(nkey=key, nname=name)" | ||
] | ||
}, | ||
{ | ||
|
@@ -149,7 +149,7 @@ | |
"source": [ | ||
"%%pydough\n", | ||
"\n", | ||
"lowest_customer_nations = nation_keys(key, name, cust_count=COUNT(customers)).TOP_K(2, by=cust_count.ASC())\n", | ||
"lowest_customer_nations = nation_keys.CALCULATE(nkey, nname, cust_count=COUNT(customers)).TOP_K(2, by=cust_count.ASC())\n", | ||
"lowest_customer_nations" | ||
] | ||
}, | ||
|
@@ -236,7 +236,9 @@ | |
"id": "f52dfcfe-6e90-44b8-b9c4-7dc08a5b28ca", | ||
"metadata": {}, | ||
"source": [ | ||
"Finally, while building a statement from smaller components is best practice in Pydough, you can always evaluate the entire expression all at once within a PyDough cell, such as this example that loads the all asian nations in the dataset." | ||
"Finally, while building a statement from smaller components is best practice in Pydough, you can always evaluate the entire expression all at once within a PyDough cell, such as this example that loads the all Asian nations in the dataset.\n", | ||
"\n", | ||
"We can use the optional `columns` argument to `to_sql` or `to_df` to specify which columns to include, or even what they should be renamed as." | ||
] | ||
}, | ||
{ | ||
|
@@ -248,7 +250,9 @@ | |
"source": [ | ||
"%%pydough\n", | ||
"\n", | ||
"pydough.to_df(nations.WHERE(region.name == \"ASIA\"))" | ||
"asian_countries = nations.WHERE(region.name == \"ASIA\")\n", | ||
"print(pydough.to_df(asian_countries, columns=[\"name\", \"key\"]))\n", | ||
"pydough.to_df(asian_countries, columns={\"nation_name\": \"name\", \"id\": \"key\"})" | ||
] | ||
}, | ||
{ | ||
|
@@ -290,7 +294,7 @@ | |
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.7" | ||
"version": "3.12.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure all of these got updated, in all of our documentation, notebooks, tests, etc.