hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-24091) Replace multiple constraints call with getAllTableConstraints api call in query planner
Date Mon, 31 Aug 2020 07:25:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-24091?focusedWorklogId=476391&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-476391
]

ASF GitHub Bot logged work on HIVE-24091:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Aug/20 07:24
            Start Date: 31/Aug/20 07:24
    Worklog Time Spent: 10m 
      Work Description: adesh-rao commented on a change in pull request #1444:
URL: https://github.com/apache/hive/pull/1444#discussion_r479944470



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
##########
@@ -5682,163 +5684,65 @@ public void dropConstraint(String dbName, String tableName, String
constraintNam
     }
   }
 
-  /**
-   * Get all primary key columns associated with the table.
-   *
-   * @param dbName Database Name
-   * @param tblName Table Name
-   * @return Primary Key associated with the table.
-   * @throws HiveException
-   */
-  public PrimaryKeyInfo getPrimaryKeys(String dbName, String tblName) throws HiveException
{
-    return getPrimaryKeys(dbName, tblName, false);
-  }
-
-  /**
-   * Get primary key columns associated with the table that are available for optimization.
-   *
-   * @param dbName Database Name
-   * @param tblName Table Name
-   * @return Primary Key associated with the table.
-   * @throws HiveException
-   */
-  public PrimaryKeyInfo getReliablePrimaryKeys(String dbName, String tblName) throws HiveException
{
-    return getPrimaryKeys(dbName, tblName, true);
-  }
-
-  private PrimaryKeyInfo getPrimaryKeys(String dbName, String tblName, boolean onlyReliable)
-      throws HiveException {
-    PerfLogger perfLogger = SessionState.getPerfLogger();
-    perfLogger.perfLogBegin(CLASS_NAME, PerfLogger.HIVE_GET_PK);
-    try {
-      List<SQLPrimaryKey> primaryKeys = getMSC().getPrimaryKeys(new PrimaryKeysRequest(dbName,
tblName));
-      if (onlyReliable && primaryKeys != null && !primaryKeys.isEmpty())
{

Review comment:
       nvm. Got it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 476391)
    Time Spent: 0.5h  (was: 20m)

> Replace multiple constraints call with getAllTableConstraints api call in query planner
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-24091
>                 URL: https://issues.apache.org/jira/browse/HIVE-24091
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ashish Sharma
>            Assignee: Ashish Sharma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Inorder get all the constraints of table i.e. PrimaryKey, ForeignKey, UniqueConstraint
,NotNullConstraint ,DefaultConstraint ,CheckConstraint. We have to do 6 different metastore
call. Replace these call with one  getAllTableConstraints  api which provide all the constraints
at once



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

Mime
View raw message