carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [12/18] carbondata git commit: [CARBONDATA-1266][PRESTO] Fixed issue for non existing table
Date Tue, 11 Jul 2017 01:43:14 GMT
[CARBONDATA-1266][PRESTO] Fixed issue for non existing table

This closes #1137


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

Branch: refs/heads/encoding_override
Commit: 92d1d970a24f4dbd975316a35cf9b38a3ccdb111
Parents: 5af529e
Author: jatin <jatin.demla@knoldus.in>
Authored: Wed Jul 5 17:34:19 2017 +0530
Committer: jackylk <jacky.likun@huawei.com>
Committed: Fri Jul 7 08:37:19 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/carbondata/presto/CarbondataMetadata.java  | 6 ------
 .../org/apache/carbondata/presto/impl/CarbonTableReader.java   | 3 ++-
 2 files changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/92d1d970/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
index 7701490..f2d19cf 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/CarbondataMetadata.java
@@ -115,9 +115,6 @@ public class CarbondataMetadata implements ConnectorMetadata {
     }
 
     CarbonTable carbonTable = carbonTableReader.getTable(schemaTableName);
-    if (carbonTable == null) {
-      return null;
-    }
 
     List<ColumnMetadata> columnsMetaList = new LinkedList<>();
     List<CarbonColumn> carbonColumns = carbonTable.getCreateOrderColumn(schemaTableName.getTableName());
@@ -148,9 +145,6 @@ public class CarbondataMetadata implements ConnectorMetadata {
 
     //CarbonTable(official struct) is stored in CarbonMetadata(official struct)
     CarbonTable cb = carbonTableReader.getTable(handle.getSchemaTableName());
-    if (cb == null) {
-      throw new TableNotFoundException(handle.getSchemaTableName());
-    }
 
     ImmutableMap.Builder<String, ColumnHandle> columnHandles = ImmutableMap.builder();
     String tableName = handle.getSchemaTableName().getTableName();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/92d1d970/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
----------------------------------------------------------------------
diff --git a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
index 54832f5..e4d3ba5 100755
--- a/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
+++ b/integration/presto/src/main/java/org/apache/carbondata/presto/impl/CarbonTableReader.java
@@ -65,6 +65,7 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import static java.util.Objects.requireNonNull;
+import com.facebook.presto.spi.TableNotFoundException;
 
 /** CarbonTableReader will be a facade of these utils
  *
@@ -251,7 +252,7 @@ public class CarbonTableReader {
 
       return parseCarbonMetadata(table);
     }
-    return null;
+    throw new TableNotFoundException(schemaTableName);
   }
 
   /**


Mime
View raw message