chenwyi2 commented on PR #5129:
URL: https://github.com/apache/hive/pull/5129#issuecomment-2065676101

   when i use this patch, the error is :
   Caused by: java.lang.RuntimeException: MetaException(message:You have 
specified an SQL statement ("UPDATE "TABLE_PARAMS" SET "PARAM_VALUE" = ? WHERE 
"TBL_ID" in (select TBL_ID from TBLS join DBS ON DBS.DB_ID=TBLS.DB_ID WHERE 
NAME=? and TBL_NAME=? ) AND "PARAM_KEY" = ? AND "PARAM_VALUE" = ?") that doesnt 
start with SELECT. This is invalid.)
        at 
org.apache.iceberg.relocated.com.google.common.base.Throwables.propagate(Throwables.java:249)
        at 
org.apache.iceberg.common.DynMethods$UnboundMethod.invoke(DynMethods.java:75)
        at 
org.apache.iceberg.hive.MetastoreUtil.alterTable(MetastoreUtil.java:75)
        at 
org.apache.iceberg.hive.HiveTableOperations.lambda$persistTable$2(HiveTableOperations.java:329)
        at org.apache.iceberg.ClientPoolImpl.run(ClientPoolImpl.java:58)
   
   and  i use mysql,  my code is 
   ```java
       String queryText = "UPDATE \"TABLE_PARAMS\" SET \"PARAM_VALUE\" = ? " + 
"WHERE \"TBL_ID\" in " +
               "(select TBL_ID from TBLS join DBS ON DBS.DB_ID=TBLS.DB_ID WHERE 
NAME=? and TBL_NAME=? ) " +
               "AND \"PARAM_KEY\" = ? AND \"PARAM_VALUE\" = ?";
       List<String> pms = new ArrayList<>();
       pms.add(newValue);
       pms.add(table.getDbName());
       pms.add(table.getTableName());
       pms.add(key);
       pms.add(expectedValue);
   
       Query queryParams = pm.newQuery("javax.jdo.query.SQL", queryText);
       return (long) executeWithArray(queryParams, pms.toArray(), queryText);
   ```


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to