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 2014/09/19 10:24:21 UTC
[3/4] git commit: TAJO-948: 'INSERT INTO' statement to non existence
table casuses NPE. (Jongyoung Park via hyunsik)
TAJO-948: 'INSERT INTO' statement to non existence table casuses NPE. (Jongyoung Park via hyunsik)
Closes #142
Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/20017748
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/20017748
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/20017748
Branch: refs/heads/block_iteration
Commit: 200177482fbce1e33de22ad3a22f7c6b4c9cb7b7
Parents: 745131e
Author: Hyunsik Choi <hy...@apache.org>
Authored: Thu Sep 18 02:00:12 2014 +0900
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Thu Sep 18 02:00:12 2014 +0900
----------------------------------------------------------------------
CHANGES | 3 +++
.../org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java | 4 ++++
2 files changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tajo/blob/20017748/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index d35041b..9a864be 100644
--- a/CHANGES
+++ b/CHANGES
@@ -141,6 +141,9 @@ Release 0.9.0 - unreleased
BUG FIXES
+ TAJO-948: 'INSERT INTO' statement to non existence table casuses
+ NPE. (Jongyoung Park via hyunsik)
+
TAJO-1048: Missed use of session variables in GlobalPlanner.
(hyunsik)
http://git-wip-us.apache.org/repos/asf/tajo/blob/20017748/tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java b/tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
index 75dcc18..7f5200d 100644
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
@@ -254,6 +254,10 @@ public class PreLogicalPlanVerifier extends BaseAlgebraVisitor <PreLogicalPlanVe
}
TableDesc table = catalog.getTableDesc(qualifiedName);
+ if (table == null) {
+ context.state.addVerification(String.format("relation \"%s\" does not exist", qualifiedName));
+ return null;
+ }
if (table.hasPartition()) {
int columnSize = table.getSchema().getColumns().size();
columnSize += table.getPartitionMethod().getExpressionSchema().getColumns().size();