@Test
  public void testAutoCreateDataType() throws SQLException {
    String SQL =
        "INSERT INTO root.sg0.d1(time,s1,s2,s3,s4,s5,s6) values(1,true,1,now(),X'cafe',\"string\",\"2024-01-01\")";
    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {
      statement.execute(SQL);
      ResultSet resultSet = statement.executeQuery("show timeseries");
      while (resultSet.next()) {
        switch (resultSet.getString(ColumnHeaderConstant.TIMESERIES)) {
          case "root.sg0.d1.s1":
            assertEquals(
                TSDataType.BOOLEAN.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
          case "root.sg0.d1.s2":
            assertEquals(
                TSDataType.DOUBLE.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
          case "root.sg0.d1.s3":
            assertEquals(
                TSDataType.INT64.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
          case "root.sg0.d1.s4":
            assertEquals(
                TSDataType.BLOB.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
          case "root.sg0.d1.s5":
            assertEquals(
                TSDataType.TEXT.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
          case "root.sg0.d1.s6":
            assertEquals(
                TSDataType.TEXT.toString(), resultSet.getString(ColumnHeaderConstant.DATATYPE));
            break;
        }
      }
    }
  }
insert data when database hasn't been set, timeseries hasn't been created and have null values
integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAutoCreateSchemaIT.java