public Long parseDateExpression(IoTDBSqlParser.DateExpressionContext ctx, String precision) {
    long time;
    time = parseDateTimeFormat(ctx.getChild(0).getText());
    for (int i = 1; i < ctx.getChildCount(); i = i + 2) {
      if ("+".equals(ctx.getChild(i).getText())) {
        time +=
            DateTimeUtils.convertDurationStrToLong(
                time, ctx.getChild(i + 1).getText(), precision, false);
      } else {
        time -=
            DateTimeUtils.convertDurationStrToLong(
                time, ctx.getChild(i + 1).getText(), precision, false);
      }
    }
    return time;
  }
parse time expression, which is addition and subtraction expression of duration time, now() or
DataTimeFormat time.

<p>eg. now() + 1d - 2h
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java