join on RVA causes run-time exception

This forum is to report technical problems with Rel.
Post Reply
HughDarwen
Posts: 121
Joined: Sat May 24, 2008 4:49 pm

join on RVA causes run-time exception

Post by HughDarwen »

The following script gave rise to the error in question. The first two statements just create and populate a relvar. The third one is a relational expression operating on that relvar. Rel appears to get the result type right but falls over in computing the result.

var EXAM_MARK base relation { StudentId CHAR, CourseId CHAR, Mark INTEGER } key {ALL BUT Mark};
EXAM_MARK := relation { tuple { StudentId 'S1', CourseId 'C1', Mark 85 }, tuple { StudentId 'S1', CourseId 'C2', Mark 49 }, tuple { StudentId 'S2', CourseId 'C1', Mark 49 }, tuple { StudentId 'S3', CourseId 'C3', Mark 66 }, tuple { StudentId 'S4', CourseId 'C1', Mark 93 } };

(EXAM_MARK{ALL BUT Mark} group ( {CourseId} AS courses)) RENAME (StudentId AS SID1)
join
(EXAM_MARK{ALL BUT Mark} group ( {CourseId} AS courses)) RENAME (StudentId AS SID2)

gives this:

RELATION {SID1 CHARACTER, courses RELATION {CourseId CHARACTER}, SID2 CHARACTER} {ERROR: TempStorageTuples: put tuple failed: ca.mb.armchair.rel3.storage.RelDatabase ca.mb.armchair.rel3.exceptions.ExceptionFatal: TempStorageTuples: put tuple failed: ca.mb.armchair.rel3.storage.RelDatabase      at ca.mb.armchair.rel3.storage.TempStorageTuples.put(TempStorageTuples.java:73)      at ca.mb.armchair.rel3.values.ValueRelation$9$1.hasNextPair(ValueRelation.java:338)      at ca.mb.armchair.rel3.values.ValueRelation$9$1.hasNext(ValueRelation.java:353)      at ca.mb.armchair.rel3.values.ValueRelation.toStream(ValueRelation.java:629)      at ca.mb.armchair.rel3.interpreter.Evaluation.toStream(Evaluation.java:18)      at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.sendEvaluate(ClientLocalConnection.java:36)      at ca.mb.armchair.rel3.client.string.ClientLocal.sendEvaluate(ClientLocal.java:52)      at ca.mb.armchair.rel3.dbrowser.ui.PanelCommandline$34.doInBackground(PanelCommandline.java:1070)      at javax.swing.SwingWorker$1.call(Unknown Source)      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)      at java.util.concurrent.FutureTask.run(Unknown Source)      at javax.swing.SwingWorker.run(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)      at java.lang.Thread.run(Unknown Source)

Hugh
Dave
Site Admin
Posts: 368
Joined: Sun Nov 27, 2005 7:19 pm

Re: join on RVA causes run-time exception

Post by Dave »

I'll fix this in the next update.
Post Reply