You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ja...@apache.org on 2018/06/16 20:06:16 UTC
[2/3] phoenix git commit: Remove duplicate if statement
Remove duplicate if statement
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/5744bfb5
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5744bfb5
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5744bfb5
Branch: refs/heads/omid2
Commit: 5744bfb540d28b89dff38d5a0d99aac24525b9e6
Parents: 83a2903
Author: James Taylor <ja...@apache.org>
Authored: Sat Jun 16 17:58:14 2018 +0200
Committer: James Taylor <ja...@apache.org>
Committed: Sat Jun 16 17:58:14 2018 +0200
----------------------------------------------------------------------
.../org/apache/phoenix/schema/MetaDataClient.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/5744bfb5/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index cb71fba..13b0e59 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -1168,14 +1168,12 @@ public class MetaDataClient {
// If the table is a view, then we will end up calling update stats
// here for all the view indexes on it. We take care of local indexes later.
if (index.getIndexType() != IndexType.LOCAL) {
- if (index.getIndexType() != IndexType.LOCAL) {
- if (table.getType() != PTableType.VIEW) {
- rowCount += updateStatisticsInternal(index.getPhysicalName(), index,
- updateStatisticsStmt.getProps(), true);
- } else {
- rowCount += updateStatisticsInternal(table.getPhysicalName(), index,
- updateStatisticsStmt.getProps(), true);
- }
+ if (table.getType() != PTableType.VIEW) {
+ rowCount += updateStatisticsInternal(index.getPhysicalName(), index,
+ updateStatisticsStmt.getProps(), true);
+ } else {
+ rowCount += updateStatisticsInternal(table.getPhysicalName(), index,
+ updateStatisticsStmt.getProps(), true);
}
}
}