hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wang dawei (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-22093) JdbcStorageHandler query mysql with wrong offset
Date Fri, 09 Aug 2019 08:43:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-22093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

wang dawei updated HIVE-22093:
------------------------------
    Description: 
CREATE EXTERNAL TABLE student_jdbc
(
 name string,
 age int,
 gpa double
)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES (
 "hive.sql.database.type" = "MYSQL",
 "hive.sql.jdbc.driver" = "com.mysql.jdbc.Driver",
 "hive.sql.jdbc.url" = "jdbc:mysql://localhost:3306/test",
 "hive.sql.dbcp.username" = "xxx",
 "hive.sql.dbcp.password" = "xxxxx",
 "hive.sql.table" = "student_1",
 "hive.sql.partitionColumn" = "id",
 "hive.sql.numPartitions" = "5",
 "hive.sql.lowerBound" = "1",
 "hive.sql.upperBound" = "36",
 "hive.sql.dbcp.maxActive" = "5",
 "hive.sql.query" = "SELECT name, age, gpa FROM student_1"
);



set mapred.map.tasks=5;

select count\(*) from student_jdbc;
82

mysql:
select count\(*) from student;
36



  was:
CREATE EXTERNAL TABLE student_jdbc
(
 name string,
 age int,
 gpa double
)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES (
 "hive.sql.database.type" = "MYSQL",
 "hive.sql.jdbc.driver" = "com.mysql.jdbc.Driver",
 "hive.sql.jdbc.url" = "jdbc:mysql://localhost:3306/test",
 "hive.sql.dbcp.username" = "xxx",
 "hive.sql.dbcp.password" = "xxxxx",
 "hive.sql.table" = "student_1",
 "hive.sql.partitionColumn" = "id",
 "hive.sql.numPartitions" = "5",
 "hive.sql.lowerBound" = "1",
 "hive.sql.upperBound" = "36",
 "hive.sql.dbcp.maxActive" = "5",
 "hive.sql.query" = "SELECT name, age, gpa FROM student_1"
);



set mapred.map.tasks=5;

select count(*) from student_jdbc;
82

mysql:
select count(*) from student;
36




> JdbcStorageHandler query mysql with wrong offset
> ------------------------------------------------
>
>                 Key: HIVE-22093
>                 URL: https://issues.apache.org/jira/browse/HIVE-22093
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.3.5
>            Reporter: wang dawei
>            Assignee: wang dawei
>            Priority: Major
>         Attachments: HIVE-22093.1.patch
>
>
> CREATE EXTERNAL TABLE student_jdbc
> (
>  name string,
>  age int,
>  gpa double
> )
> STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
> TBLPROPERTIES (
>  "hive.sql.database.type" = "MYSQL",
>  "hive.sql.jdbc.driver" = "com.mysql.jdbc.Driver",
>  "hive.sql.jdbc.url" = "jdbc:mysql://localhost:3306/test",
>  "hive.sql.dbcp.username" = "xxx",
>  "hive.sql.dbcp.password" = "xxxxx",
>  "hive.sql.table" = "student_1",
>  "hive.sql.partitionColumn" = "id",
>  "hive.sql.numPartitions" = "5",
>  "hive.sql.lowerBound" = "1",
>  "hive.sql.upperBound" = "36",
>  "hive.sql.dbcp.maxActive" = "5",
>  "hive.sql.query" = "SELECT name, age, gpa FROM student_1"
> );
> set mapred.map.tasks=5;
> select count\(*) from student_jdbc;
> 82
> mysql:
> select count\(*) from student;
> 36



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message