[ https://issues.apache.org/jira/browse/HIVE-22782?focusedWorklogId=483663&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-483663 ]
ASF GitHub Bot logged work on HIVE-22782: ----------------------------------------- Author: ASF GitHub Bot Created on: 13/Sep/20 16:46 Start Date: 13/Sep/20 16:46 Worklog Time Spent: 10m Work Description: ashish-kumar-sharma commented on a change in pull request #1419: URL: https://github.com/apache/hive/pull/1419#discussion_r487551175 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java ########## @@ -116,22 +116,12 @@ private transient Boolean outdatedForRewritingMaterializedView; /** Constraint related objects */ - private transient PrimaryKeyInfo pki; - private transient ForeignKeyInfo fki; - private transient UniqueConstraint uki; - private transient NotNullConstraint nnc; - private transient DefaultConstraint dc; - private transient CheckConstraint cc; + private transient TableConstraintsInfo tableConstraintsInfo; /** Constraint related flags * This is to track if constraints are retrieved from metastore or not */ - private transient boolean isPKFetched=false; - private transient boolean isFKFetched=false; - private transient boolean isUniqueFetched=false; - private transient boolean isNotNullFetched=false; - private transient boolean isDefaultFetched=false; - private transient boolean isCheckFetched=false; + private transient boolean isTableConstraintsFetched = false; Review comment: Currently we don't any implementation where we are calling the default constructor. But in order to have a parameterised constructor we need need a default constructor also. As a result of which in future it might possible that some implementation use. the default constructor. So its better to move back to flag based verification. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 483663) Time Spent: 6h 10m (was: 6h) > Consolidate metastore call to fetch constraints > ----------------------------------------------- > > Key: HIVE-22782 > URL: https://issues.apache.org/jira/browse/HIVE-22782 > Project: Hive > Issue Type: Improvement > Components: Query Planning > Reporter: Vineet Garg > Assignee: Ashish Sharma > Priority: Major > Labels: pull-request-available > Time Spent: 6h 10m > Remaining Estimate: 0h > > Currently separate calls are made to metastore to fetch constraints like Pk, > fk, not null etc. Since planner always retrieve these constraints we should > retrieve all of them in one call. -- This message was sent by Atlassian Jira (v8.3.4#803005)