-
Notifications
You must be signed in to change notification settings - Fork 99
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
Allow using local table/variable name to reference columns in relational algebra #205
Open
rlaiola
wants to merge
32
commits into
dbis-uibk:development
Choose a base branch
from
rlaiola:temptablefix
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
rlaiola
changed the title
Allow using temporary table name to reference a column
Allow using temporary table name to reference columns
Apr 13, 2024
rlaiola
changed the title
Allow using temporary table name to reference columns
Allow using temporary table name to reference columns in relational algebra
Apr 14, 2024
rlaiola
changed the title
Allow using temporary table name to reference columns in relational algebra
Allow using local table/variable name to reference columns in relational algebra
Apr 16, 2024
PR #215 must be merged before. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reference issue
None.
What does this implement/fix?
This PR aims at providing a more flexible way to write queries based on the SQL standard and RDBMS implementations such as MySQL, PostgreSQL and MS SQL Server. In summary, it is possible to use the given name of a relation/expression via an assignment (local table/variable) to reference its columns in other relational algebra operators.
Bear in mind that the variable name still has no influence on the schema of the expression and that the names of the attributes/columns are not affected by an assignment. However, the attributes of the output relation can now be accessed using either its original names or the variable name.
Note: To run the tests refer to http://dbis-uibk.github.io/relax/calc/local/uibk/local/0
Test 1: project column of a temp table
How to test this PR?
Test it live at https://rlaiola.github.io/relax/calc/local/uibk/local/0. For automated tests visit https://rlaiola.github.io/relax/test.html
Some casual tests