public static String longToTimeString(long timeStamp, SimpleDateFormat dateFormat) {
        if (timeStamp <= 0L) {
            return FeConstants.NULL_STRING;
        }
        return dateFormat.format(new Date(timeStamp));
    }
@Test
    public void testDateTrans() throws AnalysisException {
        Assert.assertEquals(FeConstants.NULL_STRING, TimeUtils.longToTimeString(-2));

        long timestamp = 1426125600000L;
        Assert.assertEquals("2015-03-12 10:00:00", TimeUtils.longToTimeString(timestamp));

        DateLiteral date = new DateLiteral("2015-03-01", ScalarType.DATE);
        Assert.assertEquals(20150301000000L, date.getLongValue());

        DateLiteral datetime = new DateLiteral("2015-03-01 12:00:00", ScalarType.DATETIME);
        Assert.assertEquals(20150301120000L, datetime.getLongValue());
    }