public static Long parseDateTimeExpressionToLong(String dateExpression, ZoneId zoneId) {
    ASTVisitor astVisitor = new ASTVisitor();
    astVisitor.setZoneId(zoneId);

    CharStream charStream1 = CharStreams.fromString(dateExpression);

    SqlLexer lexer1 = new SqlLexer(charStream1);
    lexer1.removeErrorListeners();
    lexer1.addErrorListener(SqlParseError.INSTANCE);

    CommonTokenStream tokens1 = new CommonTokenStream(lexer1);

    IoTDBSqlParser parser1 = new IoTDBSqlParser(tokens1);
    parser1.getInterpreter().setPredictionMode(PredictionMode.SLL);
    parser1.removeErrorListeners();
    parser1.addErrorListener(SqlParseError.INSTANCE);
    return astVisitor.parseDateExpression(parser1.dateExpression(), TIMESTAMP_PRECISION);
  }
Storage the duration into two parts: month part and non-month part, the non-month part's
precision is depended on current time precision. e.g. ms precision: '1y1mo1ms' -> monthDuration
= 13, nonMonthDuration = 1, ns precision: '1y1mo1ms' -> monthDuration = 13, nonMonthDuration =
1000_000.

@param duration the input duration string
@return the TimeDuration instance contains month part and non-month part
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java