throw new Error("Missing return statement in function");
}
final public ConstraintDefinitionNode uniqueConstraintDefinition(TableName constraintName) throws ParseException, StandardException {
int constraintType;
ResultColumnList uniqueColumnList;
//for table level constraint, second parameter will be null
constraintType = uniqueSpecification((DataTypeDescriptor) null, null);
jj_consume_token(LEFT_PAREN);
uniqueColumnList = uniqueColumnList();
jj_consume_token(RIGHT_PAREN);
//go through the unique columns list and if any of the columns in the
//list is explicitly defined null, throw an exception for this. Columns
//for which no nullability is defined are by default nullable. But in
//case of create table, there nullability changes automatically to
//non-nullable if primary key is defined on it. But if user explicitly
//defines the nullability, then defining a primary key on it in create
//table will result in an exception.
if (constraintType == DataDictionary.PRIMARYKEY_CONSTRAINT)
{
for (int index = 0; index < uniqueColumnList.size(); index++)
{
String primaryKeyColumnName = ((ResultColumn) uniqueColumnList.elementAt(index)).getName();
if (explicitlyNullableColumnsList.contains(primaryKeyColumnName))
{
String errorState = SQLState.LANG_DB2_ADD_UNIQUE_OR_PRIMARY_KEY_ON_NULL_COLS;
{if (true) throw StandardException.newException(errorState, primaryKeyColumnName);}
}