You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2016/03/16 18:24:13 UTC

tajo git commit: TAJO-2095: HiveCatalogStore::existIndexesByTable should not throw UnsupportedOperationException.

Repository: tajo
Updated Branches:
  refs/heads/branch-0.11.2 fbbe6ee19 -> ff816003a


TAJO-2095: HiveCatalogStore::existIndexesByTable should not throw UnsupportedOperationException.

Closes #976


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/ff816003
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/ff816003
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/ff816003

Branch: refs/heads/branch-0.11.2
Commit: ff816003a4c0f621452ee4510799b6acbae6d813
Parents: fbbe6ee
Author: Hyunsik Choi <hy...@apache.org>
Authored: Wed Mar 16 10:20:44 2016 -0700
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Wed Mar 16 10:20:44 2016 -0700

----------------------------------------------------------------------
 CHANGES                                         |  3 +
 .../tajo/catalog/store/HiveCatalogStore.java    | 61 ++++++++------------
 2 files changed, 26 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/ff816003/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 2d19409..8ae6b98 100644
--- a/CHANGES
+++ b/CHANGES
@@ -24,6 +24,9 @@ Release 0.11.2 - unreleased
 
   BUG FIXES
 
+    TAJO-2095: HiveCatalogStore::existIndexesByTable should not throw 
+    UnsupportedOperationException. (hyunsik)
+
     TAJO-1793: result row count unmatched for UNION ALL. (jaehwa)
 
     TAJO-2082: Aggregation on a derived table which includes union can cause 

http://git-wip-us.apache.org/repos/asf/tajo/blob/ff816003/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
----------------------------------------------------------------------
diff --git a/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java b/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
index ca2ada5..af86951 100644
--- a/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
+++ b/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
@@ -865,9 +865,8 @@ public class HiveCatalogStore extends CatalogConstants implements CatalogStore {
   }
 
   @Override
-  public List<CatalogProtos.PartitionDescProto> getPartitions(String databaseName,
-                                                         String tableName) {
-    throw new UnsupportedOperationException();
+  public List<CatalogProtos.PartitionDescProto> getPartitions(String databaseName, String tableName) {
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
 
@@ -910,76 +909,62 @@ public class HiveCatalogStore extends CatalogConstants implements CatalogStore {
 
   @Override
   public final void addFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final void deleteFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final void existFunction(final FunctionDesc func) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public final List<String> getAllFunctionNames() {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public void createIndex(CatalogProtos.IndexDescProto proto) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public void dropIndex(String databaseName, String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public CatalogProtos.IndexDescProto getIndexByName(String databaseName, String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
-  public CatalogProtos.IndexDescProto getIndexByColumns(String databaseName, String tableName, String[] columnNames)
-      {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+  public CatalogProtos.IndexDescProto getIndexByColumns(String databaseName, String tableName, String[] columnNames) {
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public boolean existIndexByName(String databaseName, String indexName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return false;
   }
 
   @Override
-  public boolean existIndexByColumns(String databaseName, String tableName, String[] columnNames)
-      {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+  public boolean existIndexByColumns(String databaseName, String tableName, String[] columnNames) {
+    return false;
   }
 
   @Override
   public List<String> getAllIndexNamesByTable(String databaseName, String tableName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return Collections.EMPTY_LIST;
   }
 
   @Override
   public boolean existIndexesByTable(String databaseName, String tableName) {
-    // TODO - not implemented yet
-    throw new UnsupportedOperationException();
+    return false;
   }
 
   @Override
@@ -1018,22 +1003,22 @@ public class HiveCatalogStore extends CatalogConstants implements CatalogStore {
 
   @Override
   public List<ColumnProto> getAllColumns() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<DatabaseProto> getAllDatabases() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<IndexDescProto> getAllIndexes() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TablePartitionProto> getAllPartitions() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
@@ -1086,17 +1071,17 @@ public class HiveCatalogStore extends CatalogConstants implements CatalogStore {
 
   @Override
   public List<TableOptionProto> getAllTableProperties() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TableStatsProto> getAllTableStats() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override
   public List<TableDescriptorProto> getAllTables() {
-    throw new UnsupportedOperationException();
+    throw new TajoRuntimeException(new UnsupportedException());
   }
 
   @Override