@ConstantFunction.List(list = {
            @ConstantFunction(name = "unix_timestamp", argTypes = {DATETIME}, returnType = BIGINT),
            @ConstantFunction(name = "unix_timestamp", argTypes = {DATE}, returnType = BIGINT)
    })
    public static ConstantOperator unixTimestamp(ConstantOperator arg) {
        LocalDateTime dt = arg.getDatetime();
        ZonedDateTime zdt = ZonedDateTime.of(dt, TimeUtils.getTimeZone().toZoneId());
        long value = zdt.toEpochSecond();
        if (value < 0 || value > TimeUtils.MAX_UNIX_TIMESTAMP) {
            value = 0;
        }
        return ConstantOperator.createBigint(value);
    }
@Test
    public void unixTimestamp() {
        ConstantOperator codt = ConstantOperator.createDatetime(LocalDateTime.of(2050, 3, 23, 9, 23, 55));

        assertEquals(2531611435L,
                ScalarOperatorFunctions.unixTimestamp(codt).getBigint());
        assertEquals(1427073835L,
                ScalarOperatorFunctions.unixTimestamp(O_DT_20150323_092355).getBigint());
    }