You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use cosette online to prove the count projection equivalence. The answer should be not equivalent. Because count(*) will include NULL value, while count(column) will exclude NULL value.
The following is the code:
schema s(a:int, b:int);
table r(s);
query q1 -- define query q1 select count(*) as a from r x;
query q2 -- define query q2 likewise select count(y.b) from r y;
verify q1 q2;
There should be not equivalent if there exist some NULL values in y.b column. Even the int type, we can still set default value to NULL, not 0.
The text was updated successfully, but these errors were encountered:
I use cosette online to prove the count projection equivalence. The answer should be not equivalent. Because count(*) will include NULL value, while count(column) will exclude NULL value.
The following is the code:
schema s(a:int, b:int);
table r(s);
query q1 -- define query q1
select count(*) as a from r x
;query q2 -- define query q2 likewise
select count(y.b) from r y
;verify q1 q2;
There should be not equivalent if there exist some NULL values in y.b column. Even the int type, we can still set default value to NULL, not 0.
The text was updated successfully, but these errors were encountered: