@Test
  public void testStringLiteralWithDoubleQuote() {
    String[] insertData = {
      "\"string\"",
      "\"`string`\"",
      "\"``string\"",
      "\"'string'\"",
      "\"''string\"",
      "\"\"\"string\"",
      "\"\\nstring\"",
      "\"\\rstring\"",
      "\"@#$%^&*()string\"",
    };

    String[] resultData = {
      "string",
      "`string`",
      "``string",
      "'string'",
      "''string",
      "\"string",
      "\\nstring",
      "\\rstring",
      "@#$%^&*()string",
    };

    try (Connection connection = EnvFactory.getEnv().getConnection();
        Statement statement = connection.createStatement()) {
      statement.execute("CREATE TIMESERIES root.sg1.d1.s1 TEXT");
      for (int i = 0; i < insertData.length; i++) {
        String insertSql =
            String.format("INSERT INTO root.sg1.d1(time, s1) values (%d, %s)", i, insertData[i]);
        statement.execute(insertSql);
      }

      try (ResultSet resultSet = statement.executeQuery("SELECT s1 FROM root.sg1.d1")) {
        int cnt = 0;
        while (resultSet.next()) {
          Assert.assertEquals(resultData[cnt], resultSet.getString("root.sg1.d1.s1"));
          cnt++;
        }
        Assert.assertEquals(insertData.length, cnt);
      }

      for (String insertDatum : insertData) {
        String querySql = String.format("SELECT s1 FROM root.sg1.d1 WHERE s1 = %s", insertDatum);
        try (ResultSet resultSet = statement.executeQuery(querySql)) {
          Assert.assertTrue(resultSet.next());
        }
      }

    } catch (SQLException e) {
      e.printStackTrace();
      fail();
    }
  }
Legal cases of using StringLiteral with double quote in insert and select clause.
integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSyntaxConventionStringLiteralIT.java