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

[jira] [Commented] (HIVE-25879) MetaStoreDirectSql test query should not query the whole DBS table

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

Miklos Szurap commented on HIVE-25879:
--------------------------------------

The first PR #2964 has been closed due to inactivity on my side. Submitted a new PR #3348. The original idea for this jira was to run a query {{select "VER_ID" from "VERSION"}}, however the unit tests failed in local derby environments where that VERSION table does not exists. Instead the proposed solution now is to run the following as a test query:
{code}
select "DB_ID" from "DBS" WHERE "DB_ID"=1
{code}

> MetaStoreDirectSql test query should not query the whole DBS table
> ------------------------------------------------------------------
>
>                 Key: HIVE-25879
>                 URL: https://issues.apache.org/jira/browse/HIVE-25879
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Miklos Szurap
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The runTestQuery() in the org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java is using a test query
> {code:java}
> select "DB_ID" from "DBS"{code}
> to determine whether the direct SQL can be used.
> With larger deployments with many (10k+) Hive databases it would be more efficienct to query a small table instead, for example the "VERSION" table should always have a single row only.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)