bustub
bustub copied to clipboard
fix(executor): add sum column for test
Signed-off-by: Alex Chi [email protected]
close https://github.com/cmu-db/bustub/issues/260
tested with sample solution, which works fine.
By the way, it seems that all our execution tests' test data are randomly generated (table_generator.cpp), which might make things hard when someone want to debug their code and see what's wrong. I will look into the possibility of having some tables of fixed value in our tests in the future if possible.
// Should have sum_c >= 0
... because table test_1's colC has uniform distribution of 0-9999. So we can only assert >=0 here. The check is somehow meaningless, but at least we can check if the column is present or not.
On randomly generated test data: it is OK if you make the student-facing tests deterministic and easy to debug, but the private grading tests should remain effectively random and unguessable by students. This is to prevent people from hard-coding answers by trying to leak test information from autograder output.
Not sure whether sum_c aggregator is using column A or C. I'll look into the code and ensure this fix is correct before merging.
... because table test_1's colC has uniform distribution of 0-9999. So we can only assert >=0 here. The check is somehow meaningless, but at least we can check if the column is present or not.
I would add this to the test comments directly so that students do not puzzle over what the test is trying to do.
Not sure whether sum_c aggregator is using column A or C. I'll look into the code and ensure this fix is correct before merging.
It should be using colC now. Also added comments about the sumC >= 0 check.
Is this confirmed to work with the refsols? It looks good to me, I just want to verify before approval.
Yes it works for refsol.