[ https://issues.apache.org/jira/browse/HIVE-22406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16961593#comment-16961593 ]
Hive QA commented on HIVE-22406: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12984180/HIVE-22406.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 17546 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/19182/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/19182/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-19182/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.YetusPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. ATTACHMENT ID: 12984180 - PreCommit-HIVE-Build > TRUNCATE TABLE fails due MySQL limitations on limit value > --------------------------------------------------------- > > Key: HIVE-22406 > URL: https://issues.apache.org/jira/browse/HIVE-22406 > Project: Hive > Issue Type: Bug > Reporter: Naveen Gangam > Assignee: Naveen Gangam > Priority: Major > Attachments: HIVE-22406.patch, HIVE-22406.patch > > > HMS currently has some APIs that accepts an integer limit value. Prior to the > change in HIVE-21734, HMS was silently converting this int to short and thus > we havent seen this issue. But semantically, its incorrect to do so quietly. > {noformat} > at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191] > Caused by: java.sql.SQLException: setMaxRows() out of range. 2147483647 > > 50000000. > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996) ~[mysql- > connector-java.jar:5.1.33] > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) ~[mysql- > connector-java.jar:5.1.33] > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) ~[mysql- > connector-java.jar:5.1.33] > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870) ~[mysql- > connector-java.jar:5.1.33] > at com.mysql.jdbc.StatementImpl.setMaxRows(StatementImpl.java:2525) ~[mysql- > connector-java.jar:5.1.33] > at > com.zaxxer.hikari.pool.HikariProxyPreparedStatement.setMaxRows(HikariProxyPreparedS > tatement.java) ~[HikariCP-2.6.1.jar:?] > {noformat} > We cannot change the RawStore api to accept shorts instead of ints. > So we have to fix the caller to use a lower limit instead of > Integer.MAX_VALUE. > {noformat} > Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Exception > thrown when executing query : SELECT DISTINCT > 'org.apache.hadoop.hive.metastore.model.MPartition' AS > `NUCLEUS_TYPE`,`A0`.`CREATE_TIME`,`A0`.`LAST_ACCESS_TIME`,`A0`.`PART_NAME`,`A0`.`WRITE_ID`,`A0`.`PART_ID`,`A0`.`PART_NAME` > AS `NUCORDER0` FROM `PARTITIONS` `A0` LEFT OUTER JOIN `TBLS` `B0` ON > `A0`.`TBL_ID` = `B0`.`TBL_ID` LEFT OUTER JOIN `DBS` `C0` ON `B0`.`DB_ID` = > `C0`.`DB_ID` WHERE `B0`.`TBL_NAME` = ? AND `C0`.`NAME` = ? AND > `C0`.`CTLG_NAME` = ? ORDER BY `NUCORDER0` LIMIT 0,2147483647 > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$truncate_table_req_result$truncate_table_req_resultStandardScheme.read(ThriftHiveMetastore.java) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$truncate_table_req_result$truncate_table_req_resultStandardScheme.read(ThriftHiveMetastore.java) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$truncate_table_req_result.read(ThriftHiveMetastore.java) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:86) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.recv_truncate_table_req(ThriftHiveMetastore.java:1999) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Client.truncate_table_req(ThriftHiveMetastore.java:1986) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.truncateTableInternal(HiveMetaStoreClient.java:1450) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.truncateTable(HiveMetaStoreClient.java:1427) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.truncateTable(SessionHiveMetaStoreClient.java:171) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) > ~[?:?] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:1.8.0_191] > at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191] > at > org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:212) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at com.sun.proxy.$Proxy59.truncateTable(Unknown Source) ~[?:?] > at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source) > ~[?:?] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > ~[?:1.8.0_191] > at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191] > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient$SynchronizedHandler.invoke(HiveMetaStoreClient.java:3122) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at com.sun.proxy.$Proxy59.truncateTable(Unknown Source) ~[?:?] > at > org.apache.hadoop.hive.ql.metadata.Hive.truncateTable(Hive.java:1277) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > at > org.apache.hadoop.hive.ql.exec.DDLTask.truncateTable(DDLTask.java:5111) > ~[hive-exec-3.1.0.3.1.5.0-17.jar:3.1.0.3.1.5.0-17] > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)