[ https://issues.apache.org/jira/browse/HIVE-22368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16954797#comment-16954797 ]
Hive QA commented on HIVE-22368: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12983353/HIVE-22368.01.patch {color:red}ERROR:{color} -1 due to no test(s) being added or modified. {color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 17542 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.metastore.TestPartitionManagement.testPartitionDiscoveryDBPattern (batchId=223) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/19054/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/19054/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-19054/ 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 Tests exited with: TestsFailedException: 1 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12983353 - PreCommit-HIVE-Build > Hive JDBC Storage Handler: some mysql data type can not be cast to hive data > type > --------------------------------------------------------------------------------- > > Key: HIVE-22368 > URL: https://issues.apache.org/jira/browse/HIVE-22368 > Project: Hive > Issue Type: Bug > Affects Versions: 3.1.0, 4.0.0, 3.1.1 > Reporter: zhangbutao > Assignee: zhangbutao > Priority: Major > Labels: pull-request-available > Fix For: 4.0.0 > > Attachments: HIVE-22368.01.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Mysql data type(date、timestamp、decimal)can not be cast to hive data > type(date、timestamp、decimal)。 > step to repo(take date type for example): > {code:java} > //MySQL table: > create table testdate(id date); > //Hive table: > CREATE EXTERNAL TABLE `hive_date`( > id date ) > ROW FORMAT SERDE > 'org.apache.hive.storage.jdbc.JdbcSerDe' > STORED BY > 'org.apache.hive.storage.jdbc.JdbcStorageHandler' > TBLPROPERTIES ( > > 'hive.sql.database.type'='MYSQL', > 'hive.sql.dbcp.password'='hive', > 'hive.sql.dbcp.username'='hive', > 'hive.sql.jdbc.driver'='com.mysql.jdbc.Driver', > 'hive.sql.jdbc.url'='jdbc:mysql://hadoop/test', > 'hive.sql.table'='testdate'); > //Hive query: > select * from hive_date; > Error: java.io.IOException: org.apache.hadoop.hive.ql.metadata.HiveException: > java.lang.ClassCastException: java.sql.Date cannot be cast to > org.apache.hadoop.hive.common.type.Date (state=,code=0) > //Error stack trace > Caused by: java.lang.ClassCastException: java.sql.Date cannot be cast to > org.apache.hadoop.hive.common.type.Date > at > org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaDateObjectInspector.getPrimitiveJavaObject(JavaDateObjectInspector.java:41) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaDateObjectInspector.getPrimitiveJavaObject(JavaDateObjectInspector.java:27) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.copyToStandardObject(ObjectInspectorUtils.java:422) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.serde2.SerDeUtils.toThriftPayload(SerDeUtils.java:173) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.serde2.thrift.ThriftFormatter.convert(ThriftFormatter.java:49) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.ListSinkOperator.process(ListSinkOperator.java:94) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:995) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:941) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:928) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.SelectOperator.process(SelectOperator.java:95) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.Operator.baseForward(Operator.java:995) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:941) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:125) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:519) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:511) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:146) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:2706) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hadoop.hive.ql.reexec.ReExecDriver.getResults(ReExecDriver.java:229) > ~[hive-exec-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > at > org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:460) > ~[hive-service-3.1.0-bc3.0.1.jar:3.1.0-bc3.0.1] > ... 25 more > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)