public static Object convertDateLiteralToNumber(DateLiteral dateLiteral) {
        if (dateLiteral.getType().isDate()) {
            return (dateLiteral.getYear() * 16 * 32L
                    + dateLiteral.getMonth() * 32
                    + dateLiteral.getDay());
        } else if (dateLiteral.getType().isDatetime()) {
            return dateLiteral.getLongValue();
        } else {
            throw new StarRocksPlannerException("Invalid date type: " + dateLiteral.getType(), ErrorType.INTERNAL_ERROR);
        }
    }
@Test
    public void testConvertDateLiteralToDouble() throws Exception {
        Object result = PartitionUtils.convertDateLiteralToNumber(
                new DateLiteral("2015-03-01", ScalarType.DATE));
        assertEquals(1031777L, result);

        result = PartitionUtils.convertDateLiteralToNumber(
                new DateLiteral("2015-03-01 12:00:00", ScalarType.DATETIME));
        assertEquals(20150301120000L, result);
    }