Message 91

Re: Answers

X-Added: With Flames (bblib $Revision: 1.4 $)
Return-path: <spapadim+@cs.cmu.edu>
X-Andrew-Authenticated-as: 0;andrew.cmu.edu;Network-Mail
Received: from po0.andrew.cmu.edu via trymail for bb+academic.cs.15-721@andrew.cmu.edu
          ID </afs/andrew.cmu.edu/usr0/bb/Mailbox/ovon3HK00UdY1ZOk5G>;
          Sun, 21 Oct 2001 16:32:19 -0400 (EDT)
Received: from mx2.andrew.cmu.edu (MX2.ANDREW.CMU.EDU [128.2.10.112])
        by po0.andrew.cmu.edu (8.9.3/8.9.3) with ESMTP id QAA25959
        for <bb+academic.cs.15-721@ams.andrew.cmu.edu>; Sun, 21 Oct 2001 16:32:18 -0400 (EDT)
Received: from iluvatar.dhs.org (pool-151-201-19-40.pitt.east.verizon.net [151.201.19.40])
        by mx2.andrew.cmu.edu (8.12.0.Beta16/8.12.0.Beta16) with ESMTP id f9LKWHtx012243;
        Sun, 21 Oct 2001 16:32:17 -0400
Received: from cs.cmu.edu (iluvatar.hobbiton.cmu.edu [192.168.0.2])
        by iluvatar.dhs.org (Postfix) with ESMTP
        id 6BCE7204F5; Sun, 21 Oct 2001 16:32:18 -0400 (EDT)
Message-ID: <3BD330D2.3030105@cs.cmu.edu>
Date: Sun, 21 Oct 2001 16:32:18 -0400
From: Spiros Papadimitriou <spapadim+@cs.cmu.edu>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010808
X-Accept-Language: en-us
MIME-Version: 1.0
To: Georgios Markakis <markakis@andrew.cmu.edu>
Cc: bb+academic.cs.15-721@andrew.cmu.edu
Subject: Re: Answers
References: <Pine.GSO.4.33L-022.0110211551370.7378-100000@unix14.andrew.cmu.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

I'm not sure how you got those contents for file0 and file1.
If you look at createFiles() in SMJTester.C, then each file
is two columns, a 4-character number and a 4-character
"filler" (which is all spaces--I'm not sure how you got
your second column).  The numbers (according to arrays
data0 and data1) are:

file0: 99, 6, 1, 9, 1, 20, 20, 5, 6, 5, 20, 100, 14, 7, 13, 13
file1: 10, 1, 1, 99, 18, 6, 10, 10, 13, 12

So, you should get these numbers in the output:
99, 6, 1, 1, 1, 1, 6, 6, 13, 13
which, sorted and with plain record concatenation
is what you have in the sample output.

Spiros

Georgios Markakis wrote:

>Spiro,
>
>For sort-merge, each file contains an array of numbers. e.g. file0
>contains 16 numbers. Since there are 2 colums in that relation, that means
>there are 8 rows.
>
>Then we join two files. For test1 it's file0 with file1 on column 0.
>The two columns of file0 are:
>1 1
>5 5
>6 6
>7 9
>13 13
>14 20
>20 20
>99 100
>
>For file1 we have:
>1 1
>6 10
>10 10
>12 13
>18 19
>
>Even when I do it on paper it seems like the resulting table should be
>(tuple0 tuple1)
>1 1 1 1
>6 6 6 10
>
>But that's not the sample output says.
>What's missing?
>
>Thanks,
>
>Georgios
>