@Test
public void testCastWithNestedFunction() throws TajoException {
QueryContext context = new QueryContext(getConf());
context.put(SessionVars.TIMEZONE, "GMT-6");
TimeZone tz = TimeZone.getTimeZone("GMT-6");
int unixtime = 1389071574;
TimestampDatum expected = DatumFactory.createTimestampDatumWithUnixTime(unixtime);
testSimpleEval(context, String.format("select to_timestamp(CAST(split_part('%d.999', '.', 1) as INT8));", unixtime),
new String[] {TimestampDatum.asChars(expected.asTimeMeta(), tz, false)});
}