[ 
https://issues.apache.org/jira/browse/DERBY-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12707544#action_12707544
 ] 

Bryan Pendleton commented on DERBY-4187:
----------------------------------------

> What is this Error says that, expected:<[&]> but was:<[TYPE]>

Hi Eranda. The '&' symbol is actually NOT the name of the column. Rather, it
is a result of running the old test in "ij". The "ij" tool has some special 
rules about
column names, and if the column name is a reserved word, "ij" prints "&" instead
of printing the column name. And if the column name is long, ij truncates the 
column
name and prints "&" at the point where it did the truncation.

You can see the actual column names in this case by looking in the Derby
reference manual. Here, we can see in altertable.out that we have just done a
'select * from sys.sysconstraints', so we just need to look up SYSCONSTRAINTS
in the reference manual at:
http://db.apache.org/derby/docs/10.5/ref/rrefsistabs23241.html
and there you can see that the actual column names are:
CONSTRAINTID, TABLEID, CONSTRAINTNAME, TYPE, SCHEMAID, STATE, REFERENCECOUNT

So to fix this, all you need to do is to change the ALterTableTest.java at line 
2460 to
use the correct column names instead of the names with the '&' in them.

There will be a number of places in AlterTableTest.java where you have to make 
this
change, but it's pretty mechanical, so hopefully once you see how to make the 
change
in one location, you can make the similar change throughout the test program.


> Convert altertable.sql to JUnit
> -------------------------------
>
>                 Key: DERBY-4187
>                 URL: https://issues.apache.org/jira/browse/DERBY-4187
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.4.2.1
>            Reporter: Eranda Sooriyabandara
>            Priority: Minor
>             Fix For: 10.5.1.2
>
>         Attachments: AlterTable.diff, AlterTable.java, AlterTableTest.diff, 
> AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.java
>
>   Original Estimate: 486.08h
>  Remaining Estimate: 486.08h
>
> Converting altertable.sql harness test to JUnit

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to