adesh-rao commented on a change in pull request #1444:
URL: https://github.com/apache/hive/pull/1444#discussion_r479944166
##########
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:
Is this being taken care of in getAllTableConstraints?
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]