@Override
    public TimePeriod.Duration visitAggregation_time_duration(
            @NotNull SiddhiQLParser.Aggregation_time_durationContext ctx) {

        if (ctx.SECONDS() != null) {
            return TimePeriod.Duration.SECONDS;
        }

        if (ctx.MINUTES() != null) {
            return TimePeriod.Duration.MINUTES;
        }

        if (ctx.HOURS() != null) {
            return TimePeriod.Duration.HOURS;
        }

        if (ctx.DAYS() != null) {
            return TimePeriod.Duration.DAYS;
        }

        if (ctx.MONTHS() != null) {
            return TimePeriod.Duration.MONTHS;
        }

        if (ctx.YEARS() != null) {
            return TimePeriod.Duration.YEARS;
        }

        throw newSiddhiParserException(ctx, "Found " + ctx.getText() + ", but only values SECONDS, MINUTES, HOURS,"
                + " DAYS, WEEKS, MONTHS or YEARS are supported");
    }
{@inheritDoc}
<p>The default implementation returns the result of calling
{@link #visitChildren} on {@code ctx}.</p>

@param ctx
modules/siddhi-query-compiler/src/main/java/io/siddhi/query/compiler/internal/SiddhiQLBaseVisitorImpl.java