hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject incubator-hawq git commit: HAWQ-885. Should fail earlier at creating for a table with quicklz compression.
Date Fri, 01 Jul 2016 02:54:10 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 828437005 -> 4f39857f1


HAWQ-885. Should fail earlier at creating for a table with quicklz compression.


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

Branch: refs/heads/master
Commit: 4f39857f152646c4fe854d31b5eb92036d2c50bc
Parents: 8284370
Author: Paul Guo <paulguo@gmail.com>
Authored: Fri Jul 1 10:35:26 2016 +0800
Committer: Paul Guo <paulguo@gmail.com>
Committed: Fri Jul 1 10:36:56 2016 +0800

----------------------------------------------------------------------
 src/backend/access/common/reloptions.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4f39857f/src/backend/access/common/reloptions.c
----------------------------------------------------------------------
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index a2a02e1..d7c535e 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -515,22 +515,20 @@ default_reloptions(Datum reloptions, bool validate, char relkind,
 
 		compresstype = values[5];
 
+		if (strcmp(compresstype, "quicklz") == 0)
+		{
+			ereport(ERROR,
+					(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+					 errmsg("compresstype \"%s\" is not supported anymore", compresstype),
+					 errOmitLocation(true)));
+		}
+
 		if (!compresstype_is_valid(compresstype))
 		{
-		  if (strcmp(compresstype, "quicklz") == 0)
-		  {
-		    ereport(ERROR,
-		        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-		         errmsg("compresstype \"%s\" is not supported anymore", compresstype),
-		         errOmitLocation(true)));
-		  }
-		  else
-		  {
-		    ereport(ERROR,
-		        (errcode(ERRCODE_UNDEFINED_OBJECT),
-		         errmsg("unknown compresstype \"%s\"", compresstype),
-					   errOmitLocation(true)));
-		  }
+			ereport(ERROR,
+					(errcode(ERRCODE_UNDEFINED_OBJECT),
+					 errmsg("unknown compresstype \"%s\"", compresstype),
+					 errOmitLocation(true)));
 		}
 
 		if ((columnstore == RELSTORAGE_PARQUET) && (strcmp(compresstype, "snappy") != 0)


Mime
View raw message