You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "De Li (Jira)" <ji...@apache.org> on 2020/05/13 06:51:00 UTC

[jira] [Comment Edited] (HIVE-23452) Exception occur when a SQL query across data stored in two relational DB by JDBCStorageHandler with Tez

    [ https://issues.apache.org/jira/browse/HIVE-23452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105975#comment-17105975 ] 

De Li edited comment on HIVE-23452 at 5/13/20, 6:50 AM:
--------------------------------------------------------

 
{code:java}
// code placeholder
CREATE EXTERNAL TABLE IF NOT EXISTS test_gp_ex (
i int
)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES (
"hive.sql.database.type" = "POSTGRES",
"hive.sql.jdbc.driver" = "org.postgresql.Driver",
"hive.sql.jdbc.url" = "jdbc:postgresql://xxxx:5432/db",
"hive.sql.dbcp.username" = "gpadmin",
"hive.sql.dbcp.password" = "xxx",
"hive.sql.table" = "test_gp"
);

CREATE EXTERNAL TABLE IF NOT EXISTS test_mysqltable_ex (
id int,
name String
)
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://xxx/test_mysql",
"hive.sql.dbcp.username" = "xxx",
"hive.sql.dbcp.password" = "xxxx",
"hive.sql.table" = "test_mysqltable"
);

SELECT aa.id,bb.name FROM test_gp_ex aa left join test_mysqltable_ex bb on aa.id=bb.id
where bb.id >1;
{code}
 

 


was (Author: lide):
 
{code:java}
// code placeholder
CREATE EXTERNAL TABLE IF NOT EXISTS test_gp_ex (
i int
)
STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
TBLPROPERTIES (
"hive.sql.database.type" = "POSTGRES",
"hive.sql.jdbc.driver" = "org.postgresql.Driver",
"hive.sql.jdbc.url" = "jdbc:postgresql://xxxx:5432/db",
"hive.sql.dbcp.username" = "gpadmin",
"hive.sql.dbcp.password" = "xxx",
"hive.sql.table" = "test_gp"
);
CREATE EXTERNAL TABLE IF NOT EXISTS test_mysql_table_db (
id int,
name String
)
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://xxx/test_mysql",
"hive.sql.dbcp.username" = "xxxx",
"hive.sql.dbcp.password" = "*xxxx",
"hive.sql.table" = "test_mysql.test_mysqltable"
);
{code}
 

 

> Exception occur when a SQL query across data stored in two relational DB by JDBCStorageHandler with Tez
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-23452
>                 URL: https://issues.apache.org/jira/browse/HIVE-23452
>             Project: Hive
>          Issue Type: Bug
>          Components: Tez
>    Affects Versions: 3.1.0
>            Reporter: De Li
>            Priority: Major
>
> Exception occur when a SQL query across data stored in two relational DB by JDBCStorageHandler with Tez. It seems there is an incorrect JDBC driver by Tez and it works when query with MR. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)