You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2021/10/06 15:59:00 UTC

[jira] [Commented] (HIVE-25594) Setup JDBC databases in tests via QT options

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

Stamatis Zampetakis commented on HIVE-25594:
--------------------------------------------

We could possibly exploit this new functionality to re-enable certain JDBC related flaky tests (e.g., HIVE-23709, HIVE-25462).

> Setup JDBC databases in tests via QT options
> --------------------------------------------
>
>                 Key: HIVE-25594
>                 URL: https://issues.apache.org/jira/browse/HIVE-25594
>             Project: Hive
>          Issue Type: Improvement
>          Components: Testing Infrastructure
>            Reporter: Stamatis Zampetakis
>            Assignee: Stamatis Zampetakis
>            Priority: Major
>
> The goal of this jira is to add a new QT option for setting up JDBC DBMS and using it in qtests which need a JDBC endpoint up and running. It can be used in tests with external JDBC tables, connectors, etc.
> A sample file using the proposed option ({{qt:database}}) is shown below.
> {code:sql}
> --!qt:database:postgres:init_sript_1234.sql:cleanup_script_1234.sql
> CREATE EXTERNAL TABLE country (name varchar(80))
> 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://localhost:5432/qtestDB",
> "hive.sql.dbcp.username" = "qtestuser",
> "hive.sql.dbcp.password" = "qtestpassword",
> "hive.sql.table" = "country");
> EXPLAIN CBO SELECT COUNT(*) from country;
> SELECT COUNT(*) from country;
> {code}
> This builds upon HIVE-25423 but proposes to use JDBC datasources without the need for a using a specific CLI driver. Furthermore, the proposed QT option syntax allows using customised init/cleanup scripts for the JDBC datasource per test.



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