hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@apache.org
Subject [05/17] incubator-hawq git commit: HAWQ-554. Create web external table shouldnot omit ON clause.
Date Fri, 18 Mar 2016 23:04:06 GMT
HAWQ-554. Create web external table shouldnot omit ON clause.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/17af44cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/17af44cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/17af44cb

Branch: refs/heads/fix-enable-orca
Commit: 17af44cb139ddbe6b0e903d041d1177b73d2e556
Parents: 2513ad1
Author: hzhang2 <zhanghuan929@163.com>
Authored: Fri Mar 18 10:33:46 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Fri Mar 18 10:42:44 2016 +0800

----------------------------------------------------------------------
 src/backend/parser/gram.y                        | 9 ++++++---
 src/test/regress/output/exttab1.source           | 6 ++++--
 src/test/regress/output/exttab1_optimizer.source | 6 ++++--
 3 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/17af44cb/src/backend/parser/gram.y
----------------------------------------------------------------------
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 4d6f76f..dc0e13b 100755
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -4610,9 +4610,12 @@ CreateExternalStmt:	CREATE OptWritable EXTERNAL OptWeb OptTemp TABLE
qualified_n
 								
 								/* if no ON clause specified, default to "ON ALL" */
 								if(extdesc->on_clause == NIL)
-								{									
-									extdesc->on_clause = lappend(extdesc->on_clause, 
-										   				   		 makeDefElem("all", (Node *)makeInteger(TRUE)));
+								{
+									ereport(ERROR,
+										(errcode(ERRCODE_SYNTAX_ERROR),
+										errmsg("ON clause must be specified in external table"),
+										errhint("Use ON number instread"),
+										errOmitLocation(true)));
 								}
 							}
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/17af44cb/src/test/regress/output/exttab1.source
----------------------------------------------------------------------
diff --git a/src/test/regress/output/exttab1.source b/src/test/regress/output/exttab1.source
index bd9dec8..ec8ed3b 100755
--- a/src/test/regress/output/exttab1.source
+++ b/src/test/regress/output/exttab1.source
@@ -557,9 +557,11 @@ drop external table ext_mpp12839;
 -- test for exec child process stderr showing in error message
 --
 create external web table ext_stderr1(a text) execute 'nosuchcommand' format 'text';
-ERROR:  the ON ALL syntax for external tables is deprecated
+ERROR:  ON clause must be specified in external table
+HINT:  Use ON number instread
 create external web table ext_stderr2(a text) execute 'cat nosuchfile.txt' format 'text';
-ERROR:  the ON ALL syntax for external tables is deprecated
+ERROR:  ON clause must be specified in external table
+HINT:  Use ON number instread
 --
 -- bad csv (quote must be a single char)
 --

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/17af44cb/src/test/regress/output/exttab1_optimizer.source
----------------------------------------------------------------------
diff --git a/src/test/regress/output/exttab1_optimizer.source b/src/test/regress/output/exttab1_optimizer.source
index 9519769..3f03143 100755
--- a/src/test/regress/output/exttab1_optimizer.source
+++ b/src/test/regress/output/exttab1_optimizer.source
@@ -557,9 +557,11 @@ drop external table ext_mpp12839;
 -- test for exec child process stderr showing in error message
 --
 create external web table ext_stderr1(a text) execute 'nosuchcommand' format 'text';
-ERROR:  the ON ALL syntax for external tables is deprecated
+ERROR:  ON clause must be specified in external table
+HINT:  Use ON number instread
 create external web table ext_stderr2(a text) execute 'cat nosuchfile.txt' format 'text';
-ERROR:  the ON ALL syntax for external tables is deprecated
+ERROR:  ON clause must be specified in external table
+HINT:  Use ON number instread
 --
 -- bad csv (quote must be a single char)
 --


Mime
View raw message