private int parseInsertColumnSpec(
      IoTDBSqlParser.InsertColumnsSpecContext ctx, InsertStatement insertStatement) {
    List<String> measurementList = new ArrayList<>();
    int timeIndex = -1;

    for (int i = 0, size = ctx.insertColumn().size(); i < size; i++) {
      String measurement = parseInsertColumn(ctx.insertColumn(i));
      if ("time".equalsIgnoreCase(measurement) || "timestamp".equalsIgnoreCase(measurement)) {
        if (timeIndex != -1) {
          throw new SemanticException("One row should only have one time value");
        } else {
          timeIndex = i;
        }
      } else {
        measurementList.add(measurement);
      }
    }
    if (measurementList.isEmpty()) {
      throw new SemanticException("InsertStatement should contain at least one measurement");
    }
    insertStatement.setMeasurementList(measurementList.toArray(new String[0]));
    return timeIndex;
  }
Parse time range (startTime and endTime) in group by time.

@throws SemanticException if startTime is larger or equals to endTime in timeRange
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java