c = new FilterItem(new SelectItem(dateColumn), OperatorType.GREATER_THAN, "2000-12-31");
assertEquals("DateCol > DATE '2000-12-31'", c.toString());
}
public void testToStringTimeStamp() throws Exception {
Column timestampColumn = new MutableColumn("TimestampCol", ColumnType.TIMESTAMP);
FilterItem c = new FilterItem(new SelectItem(timestampColumn), OperatorType.LESS_THAN,
"2000-12-31 02:30:05.007");
assertEquals("TimestampCol < TIMESTAMP '2000-12-31 02:30:05'", c.toString());
c = new FilterItem(new SelectItem(timestampColumn), OperatorType.LESS_THAN, "2000-12-31 02:30:05");
assertEquals("TimestampCol < TIMESTAMP '2000-12-31 02:30:05'", c.toString());
Column dateColumn = new MutableColumn("DateCol", ColumnType.DATE);
c = new FilterItem(new SelectItem(timestampColumn), OperatorType.GREATER_THAN, new SelectItem(dateColumn));
assertEquals("TimestampCol > DateCol", c.toString());
}