shangeyao opened a new issue, #6727:
URL: https://github.com/apache/seatunnel/issues/6727

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   When I use an older version of clickhouse (such as 20.8), the absence of the 
ILIKE keyword can cause an error in the detection method of 
clickhouseServerenableExperimentalLightweightDelete
   ```
   private static boolean clickhouseServerEnableExperimentalLightweightDelete(
               ClickHouseConnectionImpl clickhouseConnection) {
           String configKey = "allow_experimental_lightweight_delete";
           try (Statement stmt = clickhouseConnection.createStatement()) {
               ResultSet resultSet = stmt.executeQuery("SHOW SETTINGS ILIKE '%" 
+ configKey + "%'");
               while (resultSet.next()) {
                   String name = resultSet.getString("name");
                   if (name.equalsIgnoreCase(configKey)) {
                       return resultSet.getBoolean("value");
                   }
               }
               return false;
           } catch (SQLException e) {
               log.warn("Failed to get clickhouse server config: {}", 
configKey, e);
               return false;
           }
       }
   ```
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   sink {
     Clickhouse {
       host = "localhost:8123"
       database = "default"
       table = "fake_all"
       username = "xxxxx"
       password = "xxxxx"
       #dault false
       allow_experimental_lightweight_delete = false
     }
   }
   ```
   
   
   ### Running Command
   
   ```shell
   None
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: java.sql.SQLException: Code: 62, e.displayText() = DB::Exception: 
Syntax error: failed at position 15 ('ILIKE'): ILIKE 
'%allow_experimental_lightweight_delete%'. Expected PROFILES (version 
20.8.11.17)
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   _No response_
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to