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

Feature request: Avoid useless repetition in counter examples #72

Open
beta-ziliani opened this issue Jul 30, 2019 · 0 comments
Open

Feature request: Avoid useless repetition in counter examples #72

beta-ziliani opened this issue Jul 30, 2019 · 0 comments

Comments

@beta-ziliani
Copy link

beta-ziliani commented Jul 30, 2019

The following example (slightly modified from the one in the page) generates tables with lots of repetition, which could be easily avoided by truncation.

schema employee(eid:int, age:int, ??);
schema payroll(eid:int, salary:int, ??);        

table uw_emp(employee);
table uw_payroll(payroll);

query q1                
`select distinct e.eid as eid 
 from uw_emp e, uw_payroll p
 where e.eid = p.eid`;

query q2                
`select distinct e1.eid as eid 
 from uw_emp e1, uw_emp e2, uw_payroll p 
 where e1.eid = e2.eid and e1.eid = e2.eid`;

verify q1 q2;

Result:

Table uw_payroll

eid salary ??
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0
1 0 0

Table uw_emp

eid age ??
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
@beta-ziliani beta-ziliani changed the title Avoid useless repetition in counter examples Feature request: Avoid useless repetition in counter examples Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant