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

0.13.dev2 duplicate-attribute join issue #857

Closed
ixcat opened this issue Jan 15, 2021 · 0 comments
Closed

0.13.dev2 duplicate-attribute join issue #857

ixcat opened this issue Jan 15, 2021 · 0 comments
Assignees
Labels

Comments

@ixcat
Copy link
Contributor

ixcat commented Jan 15, 2021

Bug Report

Description

Testing 0.13.dev2 query engine yielded an unexpected exception when restricting on tables with duplicate fields

Reproducibility

>>> print(lab.Subject().definition)
   subject_id          : int   # institution 6 digit animal ID
   ---
   -> [nullable] Person        # person responsible for the animal
   cage_number         : int   # institution 6 digit animal ID
   date_of_birth       : date  # format: yyyy-mm-dd
   sex                 : enum('M','F','Unknown')
   -> [nullable] AnimalSource  # where was the animal ordered from
>>> print(lab.WaterRestriction().definition)
   -> Subject
   ---
   water_restriction_number    : varchar(16)   # WR number
   cage_number                 : int
   wr_start_date               : date
   wr_start_weight             : Decimal(6,3)
>>> lab.WaterRestriction() * lab.Subject().proj()
...
pymysql.err.OperationalError: (1052, "Column 'cage_number' in field
 list is ambiguous")

Expected Behavior

This previously allowed joining on the projected lab.Subject

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants