Discussion:
Question about ExecHash()
(too old to reply)
j***@uwaterloo.ca
2011-02-22 23:28:33 UTC
Permalink
In the ExecHash() method we are supposed to implement I am having a little
trouble as mine currently exits with a

"LOG: server process (PID 89260) was terminated by signal 11"

which I know to be a segmentation fault. The reason for this is that the
node that is passed in seems to have a NULL hashtable and therefore trying
to insert into this hashtable or update the hashtable's total tuples will
cause a segmentation fault.

Is the hashtable in this node supposed to be null (are we supposed to
initialize it ourselves)? I tried doing so with ExecHashTableCreate() but
that failed to work...

If not, does this mean what I did in createplan.c was incorrect?

Otherwise, what am I doing wrong.....

Thanks!
Anup Kumar Chalamalla
2011-02-23 01:15:34 UTC
Permalink
Hi,

Yes, you need to create the hash tables yourself. You are implementing a
demand-pull pipeline interface. Hence when a new tuple is required at
the hash join node, you make a call to one of the relations (outer or
inner) and pull a new tuple to probe the hash table of the other. For
the first time when you make a call, this is in the ExecHashJoin (See
section 4.5 of the assignment), you create the hash tables. You can use
ExecHashTableCreate() to do so.

Hope this helps...

Anup
Post by j***@uwaterloo.ca
Is the hashtable in this node supposed to be null (are we supposed to
initialize it ourselves)? I tried doing so with ExecHashTableCreate() but
that failed to work...
Josh Roach
2011-02-26 03:02:54 UTC
Permalink
I'm having a similar issue with ExecHash.

According to the assignment description, we should be able to get the
basic implementation of ExecHash working without having to touch
ExecHashJoin in nodeHashjoin.c

However, I can't seem to find a way to properly call
ExecHashTableCreate() in ExecHash.

Can we get ExecHash working without having to modify nodeHashjoin.c?

Thanks,
Josh
Post by Anup Kumar Chalamalla
Hi,
Yes, you need to create the hash tables yourself. You are implementing a
demand-pull pipeline interface. Hence when a new tuple is required at
the hash join node, you make a call to one of the relations (outer or
inner) and pull a new tuple to probe the hash table of the other. For
the first time when you make a call, this is in the ExecHashJoin (See
section 4.5 of the assignment), you create the hash tables. You can use
ExecHashTableCreate() to do so.
Hope this helps...
Anup
Post by j***@uwaterloo.ca
Is the hashtable in this node supposed to be null (are we supposed to
initialize it ourselves)? I tried doing so with ExecHashTableCreate()
but
Post by j***@uwaterloo.ca
that failed to work...
Anup Kumar Chalamalla
2011-02-27 06:52:35 UTC
Permalink
No, I think you need to modify the ExecHashJoin in nodeHashjoin.c. Here
is where you create the hash tables. Even in the hybrid hash join code
here is where the hash table for inner relation is created. According to
the assignment description this corresponds to the last bullet. Please
read that carefully.

Sorry for the late reply. It was buried in an older thread and did not
see that.

Anup
Post by Josh Roach
I'm having a similar issue with ExecHash.
According to the assignment description, we should be able to get the
basic implementation of ExecHash working without having to touch
ExecHashJoin in nodeHashjoin.c
However, I can't seem to find a way to properly call
ExecHashTableCreate() in ExecHash.
Can we get ExecHash working without having to modify nodeHashjoin.c?
Thanks,
Josh
Post by Anup Kumar Chalamalla
Hi,
Yes, you need to create the hash tables yourself. You are implementing
a demand-pull pipeline interface. Hence when a new tuple is required
at the hash join node, you make a call to one of the relations (outer
or inner) and pull a new tuple to probe the hash table of the other.
For the first time when you make a call, this is in the ExecHashJoin
(See section 4.5 of the assignment), you create the hash tables. You
can use ExecHashTableCreate() to do so.
Hope this helps...
Anup
Post by j***@uwaterloo.ca
Is the hashtable in this node supposed to be null (are we supposed to
initialize it ourselves)? I tried doing so with
ExecHashTableCreate() but
Post by j***@uwaterloo.ca
that failed to work...
Loading...