ValueTimestamp.parse(Integer.MAX_VALUE + "-12-31 01:02:03.0405060708").getString());
assertEquals(
Integer.MIN_VALUE + "-12-31 01:02:03.04050607",
ValueTimestamp.parse(Integer.MIN_VALUE + "-12-31 01:02:03.0405060708").getString());
ValueTimestamp t1 = ValueTimestamp.parse("2001-01-01 01:01:01.111");
assertEquals("2001-01-01 01:01:01.111", t1.getTimestamp().toString());
assertEquals("2001-01-01", t1.getDate().toString());
assertEquals("01:01:01", t1.getTime().toString());
assertEquals("TIMESTAMP '2001-01-01 01:01:01.111'", t1.getSQL());
assertEquals("TIMESTAMP '2001-01-01 01:01:01.111'", t1.toString());
assertEquals(Value.TIMESTAMP, t1.getType());
long dateValue = t1.getDateValue();
long nanos = t1.getNanos();
assertEquals((int) ((dateValue >>> 32) ^ dateValue ^
(nanos >>> 32) ^ nanos),
t1.hashCode());
assertEquals(t1.getString().length(), t1.getDisplaySize());
assertEquals(ValueTimestamp.PRECISION, t1.getPrecision());
assertEquals(10, t1.getScale());
assertEquals("java.sql.Timestamp", t1.getObject().getClass().getName());
ValueTimestamp t1b = ValueTimestamp.parse("2001-01-01 01:01:01.111");
assertTrue(t1 == t1b);
Value.clearCache();
t1b = ValueTimestamp.parse("2001-01-01 01:01:01.111");
assertFalse(t1 == t1b);
assertTrue(t1.equals(t1));
assertTrue(t1.equals(t1b));
assertTrue(t1b.equals(t1));
assertEquals(0, t1.compareTo(t1b, null));
assertEquals(0, t1b.compareTo(t1, null));
ValueTimestamp t2 = ValueTimestamp.parse("2002-02-02 02:02:02.222");
assertFalse(t1.equals(t2));
assertFalse(t2.equals(t1));
assertEquals(-1, t1.compareTo(t2, null));
assertEquals(1, t2.compareTo(t1, null));
t1 = ValueTimestamp.parse("2001-01-01 01:01:01.123456789");
assertEquals("2001-01-01 01:01:01.123456789", t1.getString());
assertEquals("2001-01-01 01:01:01.123456789", t1.convertScale(true, 10).getString());
assertEquals("2001-01-01 01:01:01.123456789", t1.convertScale(true, 9).getString());
assertEquals("2001-01-01 01:01:01.12345679", t1.convertScale(true, 8).getString());