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
RENAME in V3.013 incompatible with previous versions
-
- Posts: 124
- Joined: Sat May 24, 2008 4:49 pm
Re: RENAME in V3.013 incompatible with previous versions
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!
By the way, apologies for the slow response -- I was away most of the weekend, and unusually busy before it!
-
- Posts: 124
- Joined: Sat May 24, 2008 4:49 pm
Re: RENAME in V3.013 incompatible with previous versions
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
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