Description
I think that modifying a DTD to change its collation may be pushing the envelope of "bug-free" code. If several ValueNode's all refer to a single DTD then changing the collation of one changes all of them. This is probably not what is required. The setCollation() pattern did copy the existing setNullablity() pattern which I think is probably also wrong and subject to bugs.
Changing DTD to be (logically) immutable would be a much better solution, e.g. DTD.setNullability() returns a new DTD with the nullability set correctly, leaving the old one unmodified. (The method should also have a name change, setXXX() is wrong since it is not setting the state of the object it is called on). (Also such a method can return the same object if the state is unchanged).
Attachments
Issue Links
- is blocked by
-
DERBY-2809 Expressions with a parameter can be assigned the incorrect type
- Closed
- is related to
-
DERBY-4284 All Columns become Nullable when Using left join
- Closed
-
DERBY-3310 ASSERT in MergeSort.checkColumnTypes() disallow legal type conversions
- Closed
- relates to
-
DERBY-4913 10.3 to 10.5 upgrade fails with ava.io.StreamCorruptedException: java.lang.ClassCastException: org.apache.derby.catalog.types.OldRoutineType incompatible with org.apache.derby.iapi.types.DataTypeDescriptor
- Closed
1.
|
Refactor DataTypeDescriptor and TypeDescriptor to result in cleaner code. | Open | Unassigned |