Discussion:
Strange bug in A2
(too old to reply)
bshang
2011-02-28 23:55:42 UTC
Permalink
Hi, all,

I have a pretty strange bug here when testing my program against the
test case posted on course webpage:
we suppose to get:
manager | employee
------------+------------
Jack | Smith
Jack | Matt
Jack | Sally
Jack | Sam
Jack | Jane
Jack | Sarah
Jack | Jack
John | Joe
John | Sean
John | Mike
John | John
Sean | Jeff
Sean | Tom
Sean | Max
Simon | Kevin
Simon | Amy
Simon | Alex
Simon | Martin
Simon | Simon
Simon | Jen
(20 rows)

However, my program returns:
manager | employee
------------+------------
Jack | Matt
Jack | Sally
Jack | Sam
Jack | Jane
Jack | Sarah
Jack | Jack
John | Joe
John | Sean
John | Mike
John | John
Sean | Jeff
Sean | Tom
Sean | Max
Simon | Kevin
Simon | Amy
Simon | Alex
Simon | Martin
Simon | Simon
Simon | Jen
(19 rows)

The row Jack | Smith is somehow missing. I have checked everything, but
still have no clue. Any one can help me out?

Thanks,
S
Anup Kumar Chalamalla
2011-03-01 05:02:32 UTC
Permalink
Hi,
Most likely you are skipping some probes. Perhaps you stop probing when
one of the relations is exhausted? In symmetric hash join, you probe
until both the relations are exhausted.

You can also try reversing the order in which you probe the inner and
outer relations and see if it helps? Let me know if it does not work.

Anup
Post by bshang
Hi, all,
I have a pretty strange bug here when testing my program against the
manager | employee
------------+------------
Jack | Smith
Jack | Matt
Jack | Sally
Jack | Sam
Jack | Jane
Jack | Sarah
Jack | Jack
John | Joe
John | Sean
John | Mike
John | John
Sean | Jeff
Sean | Tom
Sean | Max
Simon | Kevin
Simon | Amy
Simon | Alex
Simon | Martin
Simon | Simon
Simon | Jen
(20 rows)
manager | employee
------------+------------
Jack | Matt
Jack | Sally
Jack | Sam
Jack | Jane
Jack | Sarah
Jack | Jack
John | Joe
John | Sean
John | Mike
John | John
Sean | Jeff
Sean | Tom
Sean | Max
Simon | Kevin
Simon | Amy
Simon | Alex
Simon | Martin
Simon | Simon
Simon | Jen
(19 rows)
The row Jack | Smith is somehow missing. I have checked everything, but
still have no clue. Any one can help me out?
Thanks,
S
Loading...