internal error on invalid attribute reference in SUMMARIZE

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

internal error on invalid attribute reference in SUMMARIZE

Post by HughDarwen »

Many thanks for 0.3.13, which I was using when I stumbled on this one.

In the expression below the second <summarize add> invalidly references an attribute defined in the first. The situation gave rise to an internal error as shown instead of a regular error message.

Hugh

summarize relation{tuple{a 'A', x 0}} by {a} add ( sum(x) as xx, sum(xx) as xxx)
a CHARACTER
xx INTEGER
xxx INTEGER
RELATION {a CHARACTER, xx INTEGER, xxx INTEGER} {ERROR: java.lang.ArrayIndexOutOfBoundsException: 1 java.lang.ArrayIndexOutOfBoundsException: 1      at ca.mb.armchair.rel3.vm.Context.tupleGetAttribute(Context.java:287)      at ca.mb.armchair.rel3.vm.instructions.tuple.OpTupleGetAttribute.execute(OpTupleGetAttribute.java:19)      at ca.mb.armchair.rel3.vm.Context.execute(Context.java:138)      at ca.mb.armchair.rel3.vm.Context.call(Context.java:144)      at ca.mb.armchair.rel3.vm.instructions.core.OpCallInvoke.execute(OpCallInvoke.java:17)      at ca.mb.armchair.rel3.vm.Context.execute(Context.java:138)      at ca.mb.armchair.rel3.vm.Context.call(Context.java:144)      at ca.mb.armchair.rel3.values.RelTupleMap.map(RelTupleMap.java:19)      at ca.mb.armchair.rel3.values.ValueRelation$10$1.next(ValueRelation.java:411)      at ca.mb.armchair.rel3.values.TupleIteration.next(TupleIteration.java:7)      at ca.mb.armchair.rel3.values.TupleIteration.run(TupleIteration.java:18)      at ca.mb.armchair.rel3.values.ValueRelation.sumInteger(ValueRelation.java:739)      at ca.mb.armchair.rel3.storage.BuiltinOperators$4.evaluate(BuiltinOperators.java:69)      at ca.mb.armchair.rel3.vm.Context.userFunction(Context.java:191)      at ca.mb.armchair.rel3.vm.instructions.core.OpNativeFunction.execute(OpNativeFunction.java:22)      at ca.mb.armchair.rel3.vm.Context.execute(Context.java:138)      at ca.mb.armchair.rel3.vm.Context.call(Context.java:144)      at ca.mb.armchair.rel3.vm.instructions.core.OpCallInvoke.execute(OpCallInvoke.java:17)      at ca.mb.armchair.rel3.vm.Context.execute(Context.java:138)      at ca.mb.armchair.rel3.vm.Context.call(Context.java:144)      at ca.mb.armchair.rel3.values.RelTupleMap.map(RelTupleMap.java:19)      at ca.mb.armchair.rel3.values.ValueRelation$10$1.next(ValueRelation.java:411)      at ca.mb.armchair.rel3.values.ValueRelation$3$1.next(ValueRelation.java:110)      at ca.mb.armchair.rel3.values.TupleIteratorUnique.hasNext(TupleIteratorUnique.java:27)      at ca.mb.armchair.rel3.values.ValueRelation.toStream(ValueRelation.java:639)      at ca.mb.armchair.rel3.interpreter.Evaluation.toStream(Evaluation.java:19)      at ca.mb.armchair.rel3.client.stream.ClientLocalConnection$1.execute(ClientLocalConnection.java:69)      at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.send(ClientLocalConnection.java:42)      at ca.mb.armchair.rel3.client.stream.ClientLocalConnection.sendEvaluate(ClientLocalConnection.java:67)      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)
Dave
Site Admin
Posts: 368
Joined: Sun Nov 27, 2005 7:19 pm

Re: internal error on invalid attribute reference in SUMMARIZE

Post by Dave »

Oops. That's supposed to produce a user-friendly error message. It will be fixed in the next update.
Dave
Site Admin
Posts: 368
Joined: Sun Nov 27, 2005 7:19 pm

Re: internal error on invalid attribute reference in SUMMARIZE

Post by Dave »

The conditions that caused this internal error message (which also affected EXTEND) have now been corrected. The fix will be available in version 0.3.15.
Post Reply