RENAME in V3.013 incompatible with previous versions

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

RENAME in V3.013 incompatible with previous versions

Post by HughDarwen »

This might not be a bug, but rather a change resulting from a bug fix, but I'm asking the question under this rubric for want of a more appropriate one.

In all versions up to V3.012 the following expression was legal:

rel{tup{x1 1}} rename {suffix '1' as '', x as y}

resulting in rel{tup{y 1}}

In V3.013 it gives an error message:

ERROR: RS0120: Rename from x to y found no matching 'from' attribute in {x1 INTEGER}

Line 1

I used this construct in an extremely complicated expression that I need to evaluate once a month (to check my domestic electricity consumption!). Have I been unwittingly exploiting a feature that is now regarded as a bug? If so, I realise that the following rewrite solves the problem:

rel{tup{x1 1}} rename {suffix '1' as ''} rename {x as y}

but is that what's intended by this change?

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

Re: RENAME in V3.013 incompatible with previous versions

Post by Dave »

It's an effect of making RENAME parallel. An expression like REL {TUP {X1 1}} RENAME {SUFFIX '1' AS '', X AS Y} now fails because for a parallel rename to work, the <old_name> of each <old_name> AS <new_name> pair must exist in the tuple/relation operand expression.

By the way, apologies for the slow response -- I was away most of the weekend, and unusually busy before it!
HughDarwen
Posts: 124
Joined: Sat May 24, 2008 4:49 pm

Re: RENAME in V3.013 incompatible with previous versions

Post by HughDarwen »

Thanks for the confirmation.

I fully agree with the change. On reflection, I feel rather ashamed of exploiting what I would regard as a bug in previous versions!

Hugh
Post Reply