You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2017/03/02 01:55:05 UTC
[1/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Repository: incubator-hawq
Updated Branches:
refs/heads/master ee79ec2fc -> 120892679
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/lib/psql.h
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/psql.h b/src/test/feature/lib/psql.h
index 7fe94c1..215a43b 100644
--- a/src/test/feature/lib/psql.h
+++ b/src/test/feature/lib/psql.h
@@ -69,7 +69,7 @@ class PSQL {
virtual ~PSQL(){};
PSQL& runSQLCommand(const std::string& sql_cmd);
- PSQL& runSQLFile(const std::string& sql_file);
+ PSQL& runSQLFile(const std::string& sql_file, bool printTupleOnly = false);
const PSQLQueryResult& getQueryResult(const std::string& sql);
PSQL& setHost(const std::string& host);
@@ -96,7 +96,7 @@ class PSQL {
const std::string _getPSQLBaseCommand() const;
const std::string _getPSQLQueryCommand(const std::string& query) const;
- const std::string _getPSQLFileCommand(const std::string& file) const;
+ const std::string _getPSQLFileCommand(const std::string& file, bool printTupleOnly = false) const;
std::string _dbname;
std::string _host;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/lib/sql_util.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/sql_util.cpp b/src/test/feature/lib/sql_util.cpp
index a19abea..b52c4f0 100644
--- a/src/test/feature/lib/sql_util.cpp
+++ b/src/test/feature/lib/sql_util.cpp
@@ -135,7 +135,9 @@ void SQLUtility::query(const string &sql, const string &expectStr) {
void SQLUtility::execSQLFile(const string &sqlFile,
const string &ansFile,
- const string &initFile) {
+ const string &initFile,
+ bool usingDefaultSchema,
+ bool printTupleOnly) {
FilePath fp;
// do precheck for sqlFile & ansFile
@@ -152,12 +154,12 @@ void SQLUtility::execSQLFile(const string &sqlFile,
ASSERT_TRUE(false) << ansFileAbsPath << " is invalid";
// generate new sql file with set search_path added at the begining
- const string newSqlFile = generateSQLFile(sqlFile);
+ const string newSqlFile = generateSQLFile(sqlFile, usingDefaultSchema);
// outFile is located in the same folder with ansFile
string outFileAbsPath = fp.path + "/" + fp.fileBaseName + ".out";
conn->setOutputFile(outFileAbsPath);
- EXPECT_EQ(0, conn->runSQLFile(newSqlFile).getLastStatus());
+ EXPECT_EQ(0, conn->runSQLFile(newSqlFile, printTupleOnly).getLastStatus());
conn->resetOutput();
// initFile if any
@@ -197,19 +199,18 @@ bool SQLUtility::execSQLFile(const string &sqlFile) {
FilePath fp = splitFilePath(sqlFile);
if (fp.fileBaseName.empty())
return false;
-
// outFile is located in the same folder with ansFile
string outFileAbsPath = "/tmp/" + fp.fileBaseName + ".out";
// generate new sql file with set search_path added at the begining
- const string newSqlFile = generateSQLFile(sqlFile);
+ const string newSqlFile = generateSQLFile(sqlFile, false);
// run sql file and store its result in output file
conn->setOutputFile(outFileAbsPath);
return conn->runSQLFile(newSqlFile).getLastStatus() == 0 ? true : false;
}
-const string SQLUtility::generateSQLFile(const string &sqlFile) {
+const string SQLUtility::generateSQLFile(const string &sqlFile, bool usingDefaultSchema) {
const string originSqlFile = testRootPath + "/" + sqlFile;
const string newSqlFile = "/tmp/" + string(test_info->test_case_name()) + "_" + test_info->name() + ".sql";
std::fstream in;
@@ -223,7 +224,9 @@ const string SQLUtility::generateSQLFile(const string &sqlFile) {
EXPECT_TRUE(false) << "Error opening file " << newSqlFile;
}
out << "-- start_ignore" << std::endl;
- out << "SET SEARCH_PATH=" + schemaName + ";" << std::endl;
+ if (!usingDefaultSchema) {
+ out << "SET SEARCH_PATH=" + schemaName + ";" << std::endl;
+ }
if (sql_util_mode == MODE_DATABASE) {
out << "\\c " << databaseName << std::endl;
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/lib/sql_util.h
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/sql_util.h b/src/test/feature/lib/sql_util.h
index 03544a0..3bdce10 100644
--- a/src/test/feature/lib/sql_util.h
+++ b/src/test/feature/lib/sql_util.h
@@ -31,6 +31,7 @@
#define HAWQ_USER (getenv("PGUSER") ? getenv("PGUSER") : "")
#define HAWQ_PASSWORD (getenv("PGPASSWORD") ? getenv("PGPASSWORD") : "")
#define HAWQ_DEFAULT_SCHEMA ("public")
+#define RANGER_HOST (getenv("RANGERHOST") ? getenv("RANGERHOST") : "localhost")
namespace hawq {
namespace test {
@@ -88,7 +89,9 @@ class SQLUtility {
// @param ansFile The given ansFile which is relative path to test root dir
// @param initFile The given initFile (used by gpdiff.pl) which is relative path to test root dir
// @return void
- void execSQLFile(const std::string &sqlFile, const std::string &ansFile, const std::string &initFile = "");
+ void execSQLFile(const std::string &sqlFile, const std::string &ansFile,
+ const std::string &initFile = "", bool usingDefaultSchema = false,
+ bool printTupleOnly = false);
// Execute sql file and check its return status
// @param sqlFile The given sqlFile which is relative path to test root dir
@@ -125,7 +128,7 @@ class SQLUtility {
private:
std::unique_ptr<hawq::test::PSQL> getConnection();
- const std::string generateSQLFile(const std::string &sqlFile);
+ const std::string generateSQLFile(const std::string &sqlFile, bool usingDefaultSchema);
FilePath splitFilePath(const std::string &filePath) const;
void exec(const std::string &sql);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/sanity_tests.txt
----------------------------------------------------------------------
diff --git a/src/test/feature/sanity_tests.txt b/src/test/feature/sanity_tests.txt
index 93f0024..1c58281 100644
--- a/src/test/feature/sanity_tests.txt
+++ b/src/test/feature/sanity_tests.txt
@@ -3,4 +3,4 @@
#you can have several PARALLEL or SRRIAL
PARALLEL=TestErrorTable.*:TestPreparedStatement.*:TestUDF.*:TestAOSnappy.*:TestAlterOwner.*:TestAlterTable.*:TestCreateTable.*:TestGuc.*:TestType.*:TestDatabase.*:TestParquet.*:TestPartition.*:TestSubplan.*:TestAggregate.*:TestCreateTypeComposite.*:TestGpDistRandom.*:TestInformationSchema.*:TestQueryInsert.*:TestQueryNestedCaseNull.*:TestQueryPolymorphism.*:TestQueryPortal.*:TestQueryPrepare.*:TestQuerySequence.*:TestCommonLib.*:TestToast.*:TestTransaction.*:TestCommand.*:TestCopy.*:TestHawqRegister.TestPartitionTableMultilevel:TestHawqRegister.TestUsage1ExpectSuccessDifferentSchema:TestHawqRegister.TestUsage1ExpectSuccess:TestHawqRegister.TestUsage1SingleHawqFile:TestHawqRegister.TestUsage1SingleHiveFile:TestHawqRegister.TestDataTypes:TestHawqRegister.TestUsage1EofSuccess:TestHawqRegister.TestUsage2Case1Expected:TestHawqRegister.TestUsage2Case2Expected
-SERIAL=TestExternalOid.TestExternalOidAll:TestExternalTable.TestExternalTableAll:TestTemp.BasicTest:TestRowTypes.*
+SERIAL=TestHawqRanger.BasicTest:TestExternalOid.TestExternalOidAll:TestExternalTable.TestExternalTableAll:TestTemp.BasicTest:TestRowTypes.*
[5/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Posted by hu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond31.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond31.ans b/src/test/feature/Ranger/ans/adminsecond31.ans
new file mode 100644
index 0000000..dfeb2dc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond31.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop EXTERNAL TABLE ext_t2;
+DROP EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond32.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond32.ans b/src/test/feature/Ranger/ans/adminsecond32.ans
new file mode 100644
index 0000000..b5ce0d4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond32.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create schema sa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: schema "sa" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond33.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond33.ans b/src/test/feature/Ranger/ans/adminsecond33.ans
new file mode 100644
index 0000000..d286367
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond33.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create temp table ta(i int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond34.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond34.ans b/src/test/feature/Ranger/ans/adminsecond34.ans
new file mode 100644
index 0000000..e0164ae
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond34.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create view av as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "av" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond35.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond35.ans b/src/test/feature/Ranger/ans/adminsecond35.ans
new file mode 100644
index 0000000..472bd3e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond35.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "aa" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond36.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond36.ans b/src/test/feature/Ranger/ans/adminsecond36.ans
new file mode 100644
index 0000000..c40975c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond36.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table sa.t(a int, b int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "t" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond37.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond37.ans b/src/test/feature/Ranger/ans/adminsecond37.ans
new file mode 100644
index 0000000..b5315a7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond37.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE SEQUENCE myseq START 1;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "myseq" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond38.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond38.ans b/src/test/feature/Ranger/ans/adminsecond38.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond38.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond39.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond39.ans b/src/test/feature/Ranger/ans/adminsecond39.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond39.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond4.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond4.ans b/src/test/feature/Ranger/ans/adminsecond4.ans
new file mode 100644
index 0000000..5a06518
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond4.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+select * from f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond40.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond40.ans b/src/test/feature/Ranger/ans/adminsecond40.ans
new file mode 100644
index 0000000..7a178c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond40.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a VALUES (nextval('myseq'));
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond41.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond41.ans b/src/test/feature/Ranger/ans/adminsecond41.ans
new file mode 100644
index 0000000..2930484
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond41.ans
@@ -0,0 +1,16 @@
+-- start_ignore
+-- end_ignore
+select * from a order by i;
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond42.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond42.ans b/src/test/feature/Ranger/ans/adminsecond42.ans
new file mode 100644
index 0000000..09dd411
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond42.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+select generate_series(1,3);
+1
+2
+3
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond43.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond43.ans b/src/test/feature/Ranger/ans/adminsecond43.ans
new file mode 100644
index 0000000..2aa5133
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond43.ans
@@ -0,0 +1,16 @@
+-- start_ignore
+-- end_ignore
+select * from av;
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond44.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond44.ans b/src/test/feature/Ranger/ans/adminsecond44.ans
new file mode 100644
index 0000000..ce8e756
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond44.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT setval('myseq', 1);
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond45.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond45.ans b/src/test/feature/Ranger/ans/adminsecond45.ans
new file mode 100644
index 0000000..574b318
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond45.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "aaa" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond46.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond46.ans b/src/test/feature/Ranger/ans/adminsecond46.ans
new file mode 100644
index 0000000..a8582d8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond46.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+PREPARE
+INSERT 0 1
+DEALLOCATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond47.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond47.ans b/src/test/feature/Ranger/ans/adminsecond47.ans
new file mode 100644
index 0000000..0d86b62
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond47.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+explain select * from a;
+Gather Motion 1:1 (slice1; segments: 1) (cost=0.00..1.08 rows=8 width=4)
+ -> Append-only Scan on a (cost=0.00..1.08 rows=8 width=4)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond48.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond48.ans b/src/test/feature/Ranger/ans/adminsecond48.ans
new file mode 100644
index 0000000..1645c06
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond48.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: function "scube_accum" already exists with same argument types
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond49.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond49.ans b/src/test/feature/Ranger/ans/adminsecond49.ans
new file mode 100644
index 0000000..b3bda3e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond49.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: function "scube" already exists with same argument types
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond5.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond5.ans b/src/test/feature/Ranger/ans/adminsecond5.ans
new file mode 100644
index 0000000..9a6a74f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond5.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop function f4();
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond50.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond50.ans b/src/test/feature/Ranger/ans/adminsecond50.ans
new file mode 100644
index 0000000..c0e6523
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond50.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+ALTER AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond51.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond51.ans b/src/test/feature/Ranger/ans/adminsecond51.ans
new file mode 100644
index 0000000..aa4f869
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond51.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP AGGREGATE scube2(numeric);
+DROP AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond52.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond52.ans b/src/test/feature/Ranger/ans/adminsecond52.ans
new file mode 100644
index 0000000..af03391
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond52.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP FUNCTION scube_accum(numeric, numeric);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond53.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond53.ans b/src/test/feature/Ranger/ans/adminsecond53.ans
new file mode 100644
index 0000000..0439490
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond53.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TYPE mytype AS (f1 int, f2 int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "mytype" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond54.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond54.ans b/src/test/feature/Ranger/ans/adminsecond54.ans
new file mode 100644
index 0000000..a2a06e9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond54.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: function "getfoo" already exists with same argument types
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond55.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond55.ans b/src/test/feature/Ranger/ans/adminsecond55.ans
new file mode 100644
index 0000000..e2894c2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond55.ans
@@ -0,0 +1,17 @@
+-- start_ignore
+-- end_ignore
+select getfoo();
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(2,2)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond56.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond56.ans b/src/test/feature/Ranger/ans/adminsecond56.ans
new file mode 100644
index 0000000..7577294
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond56.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop type mytype cascade;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: drop cascades to function getfoo()
+DROP TYPE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond57.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond57.ans b/src/test/feature/Ranger/ans/adminsecond57.ans
new file mode 100644
index 0000000..1dd130e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond57.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+BEGIN
+DECLARE CURSOR
+1
+1
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond58.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond58.ans b/src/test/feature/Ranger/ans/adminsecond58.ans
new file mode 100644
index 0000000..3b7fd19
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond58.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+BEGIN
+INSERT 0 1
+SAVEPOINT
+INSERT 0 1
+RELEASE
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond59.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond59.ans b/src/test/feature/Ranger/ans/adminsecond59.ans
new file mode 100644
index 0000000..ac2d8c7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond59.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+\d
+public|a|table|usertest1|append only
+public|aa|table|usertest35|append only
+public|aaa|table|usertest45|append only
+public|av|view|usertest34|none
+public|myseq|sequence|usertest37|heap
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond6.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond6.ans b/src/test/feature/Ranger/ans/adminsecond6.ans
new file mode 100644
index 0000000..8691498
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond6.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop language plpythonu;
+DROP LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond60.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond60.ans b/src/test/feature/Ranger/ans/adminsecond60.ans
new file mode 100644
index 0000000..f235f1e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond60.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze a;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond61.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond61.ans b/src/test/feature/Ranger/ans/adminsecond61.ans
new file mode 100644
index 0000000..36b8749
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond61.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond62.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond62.ans b/src/test/feature/Ranger/ans/adminsecond62.ans
new file mode 100644
index 0000000..3281aef
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond62.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum aa;
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond63.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond63.ans b/src/test/feature/Ranger/ans/adminsecond63.ans
new file mode 100644
index 0000000..15dac5d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond63.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum analyze;
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond64.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond64.ans b/src/test/feature/Ranger/ans/adminsecond64.ans
new file mode 100644
index 0000000..7565e97
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond64.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+truncate aa;
+TRUNCATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond65.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond65.ans b/src/test/feature/Ranger/ans/adminsecond65.ans
new file mode 100644
index 0000000..1f19c46
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond65.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+alter table a rename column i to j;
+ALTER TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond66.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond66.ans b/src/test/feature/Ranger/ans/adminsecond66.ans
new file mode 100644
index 0000000..6779298
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond66.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop SEQUENCE myseq;
+DROP SEQUENCE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond67.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond67.ans b/src/test/feature/Ranger/ans/adminsecond67.ans
new file mode 100644
index 0000000..7b67364
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond67.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop view av;
+DROP VIEW
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond68.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond68.ans b/src/test/feature/Ranger/ans/adminsecond68.ans
new file mode 100644
index 0000000..071be2a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond68.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aaa;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond69.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond69.ans b/src/test/feature/Ranger/ans/adminsecond69.ans
new file mode 100644
index 0000000..e203c88
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond69.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aa;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond7.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond7.ans b/src/test/feature/Ranger/ans/adminsecond7.ans
new file mode 100644
index 0000000..5026d33
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond7.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond70.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond70.ans b/src/test/feature/Ranger/ans/adminsecond70.ans
new file mode 100644
index 0000000..e7fbc71
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond70.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table a;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond71.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond71.ans b/src/test/feature/Ranger/ans/adminsecond71.ans
new file mode 100644
index 0000000..a9779cf
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond71.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop schema sa CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: drop cascades to append only table sa.t
+DROP SCHEMA
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond8.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond8.ans b/src/test/feature/Ranger/ans/adminsecond8.ans
new file mode 100644
index 0000000..03712a3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond8.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond9.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond9.ans b/src/test/feature/Ranger/ans/adminsecond9.ans
new file mode 100644
index 0000000..4f5faf3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond9.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: operator <# already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal10_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal10_fail.ans b/src/test/feature/Ranger/ans/normal10_fail.ans
new file mode 100644
index 0000000..a8cb544
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal10_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest10;
+SET
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal10_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal10_success.ans b/src/test/feature/Ranger/ans/normal10_success.ans
new file mode 100644
index 0000000..6e4bc51
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal10_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest10;
+SET
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal11_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal11_success.ans b/src/test/feature/Ranger/ans/normal11_success.ans
new file mode 100644
index 0000000..ac36733
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal11_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest11;
+SET
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to create an operator class
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal12_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal12_success.ans b/src/test/feature/Ranger/ans/normal12_success.ans
new file mode 100644
index 0000000..b705160
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal12_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest12;
+SET
+drop OPERATOR CLASS sva_special_ops USING btree;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: operator class "sva_special_ops" does not exist for access method "btree"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal13_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal13_fail.ans b/src/test/feature/Ranger/ans/normal13_fail.ans
new file mode 100644
index 0000000..ce0b5f8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal13_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest13;
+SET
+drop OPERATOR <# (text,text) CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: operator does not exist: text <# text
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal13_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal13_success.ans b/src/test/feature/Ranger/ans/normal13_success.ans
new file mode 100644
index 0000000..ff30c8a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal13_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest13;
+SET
+drop OPERATOR <# (text,text) CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of operator <#
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal14_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal14_fail.ans b/src/test/feature/Ranger/ans/normal14_fail.ans
new file mode 100644
index 0000000..e9314ec
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal14_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest14;
+SET
+drop FUNCTION si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function si_same(text, text) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal14_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal14_success.ans b/src/test/feature/Ranger/ans/normal14_success.ans
new file mode 100644
index 0000000..4f220db
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal14_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest14;
+SET
+drop FUNCTION si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of function si_same
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal15_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal15_fail.ans b/src/test/feature/Ranger/ans/normal15_fail.ans
new file mode 100644
index 0000000..9494640
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal15_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest15;
+SET
+drop FUNCTION si_lt(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function si_lt(text, text) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal15_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal15_success.ans b/src/test/feature/Ranger/ans/normal15_success.ans
new file mode 100644
index 0000000..b4ab33f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal15_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest15;
+SET
+drop FUNCTION si_lt(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of function si_lt
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal16_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal16_fail.ans b/src/test/feature/Ranger/ans/normal16_fail.ans
new file mode 100644
index 0000000..6fa2bbb
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal16_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest16;
+SET
+drop FUNCTION normalize_si(text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function normalize_si(text) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal16_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal16_success.ans b/src/test/feature/Ranger/ans/normal16_success.ans
new file mode 100644
index 0000000..9932360
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal16_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest16;
+SET
+drop FUNCTION normalize_si(text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of function normalize_si
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal17_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal17_success.ans b/src/test/feature/Ranger/ans/normal17_success.ans
new file mode 100644
index 0000000..2687926
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal17_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest17;
+SET
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to create resource queues
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal18_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal18_success.ans b/src/test/feature/Ranger/ans/normal18_success.ans
new file mode 100644
index 0000000..6b0c649
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal18_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest18;
+SET
+DROP RESOURCE QUEUE myqueue;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to drop resource queues
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal19_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal19_success.ans b/src/test/feature/Ranger/ans/normal19_success.ans
new file mode 100644
index 0000000..4cfa788
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal19_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest19;
+SET
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied to create tablespace "mytblspace"
+HINT: Must be superuser to create a tablespace.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal1_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal1_fail.ans b/src/test/feature/Ranger/ans/normal1_fail.ans
new file mode 100644
index 0000000..f803b85
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal1_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest1;
+SET
+create table a(i int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal1_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal1_success.ans b/src/test/feature/Ranger/ans/normal1_success.ans
new file mode 100644
index 0000000..433be29
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal1_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest1;
+SET
+create table a(i int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal20_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal20_fail.ans b/src/test/feature/Ranger/ans/normal20_fail.ans
new file mode 100644
index 0000000..744f4b3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal20_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest20;
+SET
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal20_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal20_success.ans b/src/test/feature/Ranger/ans/normal20_success.ans
new file mode 100644
index 0000000..2844ebe
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal20_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest20;
+SET
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal21_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal21_fail.ans b/src/test/feature/Ranger/ans/normal21_fail.ans
new file mode 100644
index 0000000..028cd08
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal21_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest21;
+SET
+insert into foo(i) values(1234);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "foo" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal21_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal21_success.ans b/src/test/feature/Ranger/ans/normal21_success.ans
new file mode 100644
index 0000000..b39d6f1
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal21_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest21;
+SET
+insert into foo(i) values(1234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal22_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal22_fail.ans b/src/test/feature/Ranger/ans/normal22_fail.ans
new file mode 100644
index 0000000..54baf87
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal22_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest22;
+SET
+drop table foo;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "foo" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal22_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal22_success.ans b/src/test/feature/Ranger/ans/normal22_success.ans
new file mode 100644
index 0000000..68e6742
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal22_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest22;
+SET
+drop table foo;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation foo
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal23_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal23_success.ans b/src/test/feature/Ranger/ans/normal23_success.ans
new file mode 100644
index 0000000..4f0e5f3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal23_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest23;
+SET
+drop tablespace mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of tablespace mytblspace
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal24_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal24_success.ans b/src/test/feature/Ranger/ans/normal24_success.ans
new file mode 100644
index 0000000..afc82d2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal24_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest24;
+SET
+COPY a FROM '/tmp/a.txt';
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to COPY to or from a file
+HINT: Anyone can COPY to stdout or from stdin. psql's \copy command also works for anyone.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal25_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal25_fail.ans b/src/test/feature/Ranger/ans/normal25_fail.ans
new file mode 100644
index 0000000..f54f85e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal25_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest25;
+SET
+COPY a TO STDOUT WITH DELIMITER '|';
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal25_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal25_success.ans b/src/test/feature/Ranger/ans/normal25_success.ans
new file mode 100644
index 0000000..78fbd98
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal25_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest25;
+SET
+COPY a TO STDOUT WITH DELIMITER '|';
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal26_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal26_fail.ans b/src/test/feature/Ranger/ans/normal26_fail.ans
new file mode 100644
index 0000000..91ff794
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal26_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest26;
+SET
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal26_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal26_success.ans b/src/test/feature/Ranger/ans/normal26_success.ans
new file mode 100644
index 0000000..3cebdd3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal26_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest26;
+SET
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+CREATE EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal27_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal27_fail.ans b/src/test/feature/Ranger/ans/normal27_fail.ans
new file mode 100644
index 0000000..ab32a6b
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal27_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest27;
+SET
+select * from ext_t order by N_NATIONKEY;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select * from ext_t order by N_NATIONKEY;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "ext_t" does not exist
+LINE 1: select * from ext_t order by N_NATIONKEY;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal27_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal27_success.ans b/src/test/feature/Ranger/ans/normal27_success.ans
new file mode 100644
index 0000000..8c61c43
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal27_success.ans
@@ -0,0 +1,31 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest27;
+SET
+select * from ext_t order by N_NATIONKEY;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: NOTICE: Found 50 data formatting errors (50 or more input rows). Rejected related input data.
+0|ALGERIA |0| haggle. carefully final deposits detect slyly agai
+1|ARGENTINA |1|al foxes promise slyly according to the regular accounts. bold requests alon
+2|BRAZIL |1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
+3|CANADA |1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
+4|EGYPT |4|y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
+5|ETHIOPIA |0|ven packages wake quickly. regu
+6|FRANCE |3|refully final requests. regular, ironi
+7|GERMANY |3|l platelets. regular accounts x-ray: unusual, regular acco
+8|INDIA |2|ss excuses cajole slyly across the packages. deposits print aroun
+9|INDONESIA |2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull
+10|IRAN |4|efully alongside of the slyly final dependencies.
+11|IRAQ |4|nic deposits boost atop the quickly final requests? quickly regula
+12|JAPAN |2|ously. final, express gifts cajole a
+13|JORDAN |4|ic deposits are blithely about the carefully regular pa
+14|KENYA |0| pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+15|MOROCCO |0|rns. blithely bold courts among the closely regular packages use furiously bold platelets?
+16|MOZAMBIQUE |0|s. ironic, unusual asymptotes wake blithely r
+17|PERU |1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+18|CHINA |2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos
+19|ROMANIA |3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account
+20|SAUDI ARABIA |4|ts. silent requests haggle. closely express packages sleep across the blithely
+21|VIETNAM |2|hely enticingly express accounts. even, final
+22|RUSSIA |3| requests against the platelets use never according to the quickly regular pint
+23|UNITED KINGDOM |3|eans boost carefully special requests. accounts are. carefull
+24|UNITED STATES |1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal28_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal28_fail.ans b/src/test/feature/Ranger/ans/normal28_fail.ans
new file mode 100644
index 0000000..0c000bc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal28_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest28;
+SET
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal28_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal28_success.ans b/src/test/feature/Ranger/ans/normal28_success.ans
new file mode 100644
index 0000000..be9eb64
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal28_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest28;
+SET
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+CREATE EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal29_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal29_fail.ans b/src/test/feature/Ranger/ans/normal29_fail.ans
new file mode 100644
index 0000000..828dae4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal29_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest29;
+SET
+insert into ext_t2(i) values(234);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "ext_t2" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal29_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal29_success.ans b/src/test/feature/Ranger/ans/normal29_success.ans
new file mode 100644
index 0000000..85a5c4c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal29_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest29;
+SET
+insert into ext_t2(i) values(234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal2_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal2_success.ans b/src/test/feature/Ranger/ans/normal2_success.ans
new file mode 100644
index 0000000..b410461
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal2_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest2;
+SET
+create language plpythonu;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to create procedural language
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal30_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal30_fail.ans b/src/test/feature/Ranger/ans/normal30_fail.ans
new file mode 100644
index 0000000..8f78f5f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal30_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest30;
+SET
+drop EXTERNAL TABLE ext_t;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "ext_t" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal30_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal30_success.ans b/src/test/feature/Ranger/ans/normal30_success.ans
new file mode 100644
index 0000000..ad6119f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal30_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest30;
+SET
+drop EXTERNAL TABLE ext_t;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation ext_t
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal31_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal31_fail.ans b/src/test/feature/Ranger/ans/normal31_fail.ans
new file mode 100644
index 0000000..271ff3d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal31_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest31;
+SET
+drop EXTERNAL TABLE ext_t2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "ext_t2" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal31_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal31_success.ans b/src/test/feature/Ranger/ans/normal31_success.ans
new file mode 100644
index 0000000..cc3635e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal31_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest31;
+SET
+drop EXTERNAL TABLE ext_t2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation ext_t2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal32_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal32_fail.ans b/src/test/feature/Ranger/ans/normal32_fail.ans
new file mode 100644
index 0000000..1eab158
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal32_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest32;
+SET
+create schema sa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for database hawq_feature_test_db
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal32_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal32_success.ans b/src/test/feature/Ranger/ans/normal32_success.ans
new file mode 100644
index 0000000..18dbc83
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal32_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest32;
+SET
+create schema sa;
+CREATE SCHEMA
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal33_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal33_fail.ans b/src/test/feature/Ranger/ans/normal33_fail.ans
new file mode 100644
index 0000000..2039883
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal33_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest33;
+SET
+create temp table ta(i int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied to create temporary tables in database "hawq_feature_test_db"
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal33_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal33_success.ans b/src/test/feature/Ranger/ans/normal33_success.ans
new file mode 100644
index 0000000..a6217bb
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal33_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest33;
+SET
+create temp table ta(i int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal34_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal34_fail.ans b/src/test/feature/Ranger/ans/normal34_fail.ans
new file mode 100644
index 0000000..9dc7ac3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal34_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest34;
+SET
+create view av as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: create view av as select * from a order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: create view av as select * from a order by i;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal34_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal34_success.ans b/src/test/feature/Ranger/ans/normal34_success.ans
new file mode 100644
index 0000000..fc1a30c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal34_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest34;
+SET
+create view av as select * from a order by i;
+CREATE VIEW
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal35_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal35_fail.ans b/src/test/feature/Ranger/ans/normal35_fail.ans
new file mode 100644
index 0000000..36d1a06
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal35_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest35;
+SET
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: create table aa as select * from a order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: create table aa as select * from a order by i;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal35_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal35_success.ans b/src/test/feature/Ranger/ans/normal35_success.ans
new file mode 100644
index 0000000..0957278
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal35_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest35;
+SET
+create table aa as select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aa" --- error returned: permission denied for relation(s): aa
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: INFO: ANALYZE completed. Success: 0, Failure: 1 (aa)
+SELECT 2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal36_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal36_fail.ans b/src/test/feature/Ranger/ans/normal36_fail.ans
new file mode 100644
index 0000000..93db827
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal36_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest36;
+SET
+create table sa.t(a int, b int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for schema sa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal36_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal36_success.ans b/src/test/feature/Ranger/ans/normal36_success.ans
new file mode 100644
index 0000000..a7cc1b4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal36_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest36;
+SET
+create table sa.t(a int, b int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal37_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal37_fail.ans b/src/test/feature/Ranger/ans/normal37_fail.ans
new file mode 100644
index 0000000..c6820d0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal37_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest37;
+SET
+CREATE SEQUENCE myseq START 1;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal37_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal37_success.ans b/src/test/feature/Ranger/ans/normal37_success.ans
new file mode 100644
index 0000000..a78bcc7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal37_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest37;
+SET
+CREATE SEQUENCE myseq START 1;
+CREATE SEQUENCE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal38_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal38_fail.ans b/src/test/feature/Ranger/ans/normal38_fail.ans
new file mode 100644
index 0000000..7a09017
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal38_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest38;
+SET
+insert into a values(1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal38_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal38_success.ans b/src/test/feature/Ranger/ans/normal38_success.ans
new file mode 100644
index 0000000..ad854c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal38_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest38;
+SET
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal39_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal39_fail.ans b/src/test/feature/Ranger/ans/normal39_fail.ans
new file mode 100644
index 0000000..cc74786
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal39_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest39;
+SET
+insert into a values(1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal39_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal39_success.ans b/src/test/feature/Ranger/ans/normal39_success.ans
new file mode 100644
index 0000000..0293239
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal39_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest39;
+SET
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal3_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal3_success.ans b/src/test/feature/Ranger/ans/normal3_success.ans
new file mode 100644
index 0000000..cff11bc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal3_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest3;
+SET
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for language plpythonu
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal40_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal40_fail.ans b/src/test/feature/Ranger/ans/normal40_fail.ans
new file mode 100644
index 0000000..1f0e53a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal40_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest40;
+SET
+insert into a VALUES (nextval('myseq'));
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal40_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal40_success.ans b/src/test/feature/Ranger/ans/normal40_success.ans
new file mode 100644
index 0000000..86dd8de
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal40_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest40;
+SET
+insert into a VALUES (nextval('myseq'));
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal41_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal41_fail.ans b/src/test/feature/Ranger/ans/normal41_fail.ans
new file mode 100644
index 0000000..8ac9d96
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal41_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest41;
+SET
+select * from a order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select * from a order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: select * from a order by i;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal41_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal41_success.ans b/src/test/feature/Ranger/ans/normal41_success.ans
new file mode 100644
index 0000000..a49b3f9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal41_success.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest41;
+SET
+select * from a order by i;
+1
+1
+1
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal42_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal42_fail.ans b/src/test/feature/Ranger/ans/normal42_fail.ans
new file mode 100644
index 0000000..db5b954
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal42_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest42;
+SET
+select generate_series(1,3);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select generate_series(1,3);
+ ^
+1
+2
+3
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal42_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal42_success.ans b/src/test/feature/Ranger/ans/normal42_success.ans
new file mode 100644
index 0000000..63f8bb3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal42_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest42;
+SET
+select generate_series(1,3);
+1
+2
+3
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal43_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal43_fail.ans b/src/test/feature/Ranger/ans/normal43_fail.ans
new file mode 100644
index 0000000..151c974
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal43_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest43;
+SET
+select * from av;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select * from av;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "av" does not exist
+LINE 1: select * from av;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal43_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal43_success.ans b/src/test/feature/Ranger/ans/normal43_success.ans
new file mode 100644
index 0000000..0740a4a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal43_success.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest43;
+SET
+select * from av;
+1
+1
+1
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal44_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal44_fail.ans b/src/test/feature/Ranger/ans/normal44_fail.ans
new file mode 100644
index 0000000..9d78edd
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal44_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest44;
+SET
+SELECT setval('myseq', 1);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: SELECT setval('myseq', 1);
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "myseq" does not exist
+LINE 1: SELECT setval('myseq', 1);
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal44_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal44_success.ans b/src/test/feature/Ranger/ans/normal44_success.ans
new file mode 100644
index 0000000..bab96c3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal44_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest44;
+SET
+SELECT setval('myseq', 1);
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal45_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal45_fail.ans b/src/test/feature/Ranger/ans/normal45_fail.ans
new file mode 100644
index 0000000..00bbb05
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal45_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest45;
+SET
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal45_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal45_success.ans b/src/test/feature/Ranger/ans/normal45_success.ans
new file mode 100644
index 0000000..44e049c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal45_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest45;
+SET
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+SELECT 5
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal46_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal46_fail.ans b/src/test/feature/Ranger/ans/normal46_fail.ans
new file mode 100644
index 0000000..b3194f2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal46_fail.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest46;
+SET
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: prepared statement "fooplan" does not exist
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: prepared statement "fooplan" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal46_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal46_success.ans b/src/test/feature/Ranger/ans/normal46_success.ans
new file mode 100644
index 0000000..9faf6b5
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal46_success.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest46;
+SET
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+PREPARE
+INSERT 0 1
+DEALLOCATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal47_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal47_fail.ans b/src/test/feature/Ranger/ans/normal47_fail.ans
new file mode 100644
index 0000000..4b51dee
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal47_fail.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest47;
+SET
+explain select * from a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: explain select * from a;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: explain select * from a;
+ ^
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal47_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal47_success.ans b/src/test/feature/Ranger/ans/normal47_success.ans
new file mode 100644
index 0000000..f7f05ab
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal47_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest47;
+SET
+explain select * from a;
+Gather Motion 1:1 (slice1; segments: 1) (cost=0.00..1.02 rows=2 width=4)
+ -> Append-only Scan on a (cost=0.00..1.02 rows=2 width=4)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal48_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal48_fail.ans b/src/test/feature/Ranger/ans/normal48_fail.ans
new file mode 100644
index 0000000..0d2cff9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal48_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest48;
+SET
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal48_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal48_success.ans b/src/test/feature/Ranger/ans/normal48_success.ans
new file mode 100644
index 0000000..c7bfa6d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal48_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest48;
+SET
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal49_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal49_fail.ans b/src/test/feature/Ranger/ans/normal49_fail.ans
new file mode 100644
index 0000000..bcd38d9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal49_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest49;
+SET
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal49_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal49_success.ans b/src/test/feature/Ranger/ans/normal49_success.ans
new file mode 100644
index 0000000..5a1f409
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal49_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest49;
+SET
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+CREATE AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal4_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal4_fail.ans b/src/test/feature/Ranger/ans/normal4_fail.ans
new file mode 100644
index 0000000..2fb527d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal4_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest4;
+SET
+select * from f4();
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select * from f4();
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function f4() does not exist
+LINE 1: select * from f4();
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal4_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal4_success.ans b/src/test/feature/Ranger/ans/normal4_success.ans
new file mode 100644
index 0000000..89b98e4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal4_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest4;
+SET
+select * from f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal50_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal50_fail.ans b/src/test/feature/Ranger/ans/normal50_fail.ans
new file mode 100644
index 0000000..7e97ed0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal50_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest50;
+SET
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: aggregate scube(numeric) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal50_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal50_success.ans b/src/test/feature/Ranger/ans/normal50_success.ans
new file mode 100644
index 0000000..998ff58
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal50_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest50;
+SET
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of function scube
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal51_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal51_fail.ans b/src/test/feature/Ranger/ans/normal51_fail.ans
new file mode 100644
index 0000000..5af5c8d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal51_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest51;
+SET
+DROP AGGREGATE scube2(numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: aggregate scube2(numeric) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal51_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal51_success.ans b/src/test/feature/Ranger/ans/normal51_success.ans
new file mode 100644
index 0000000..4177514
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal51_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest51;
+SET
+DROP AGGREGATE scube2(numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: aggregate scube2(numeric) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal52_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal52_fail.ans b/src/test/feature/Ranger/ans/normal52_fail.ans
new file mode 100644
index 0000000..8a1b317
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal52_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest52;
+SET
+DROP FUNCTION scube_accum(numeric, numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function scube_accum(numeric, numeric) does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal52_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal52_success.ans b/src/test/feature/Ranger/ans/normal52_success.ans
new file mode 100644
index 0000000..97caee7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal52_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest52;
+SET
+DROP FUNCTION scube_accum(numeric, numeric);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of function scube_accum
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal53_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal53_fail.ans b/src/test/feature/Ranger/ans/normal53_fail.ans
new file mode 100644
index 0000000..c59bf8f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal53_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest53;
+SET
+CREATE TYPE mytype AS (f1 int, f2 int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal53_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal53_success.ans b/src/test/feature/Ranger/ans/normal53_success.ans
new file mode 100644
index 0000000..6b38957
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal53_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest53;
+SET
+CREATE TYPE mytype AS (f1 int, f2 int);
+CREATE TYPE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal54_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal54_fail.ans b/src/test/feature/Ranger/ans/normal54_fail.ans
new file mode 100644
index 0000000..d6e3d39
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal54_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest54;
+SET
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal54_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal54_success.ans b/src/test/feature/Ranger/ans/normal54_success.ans
new file mode 100644
index 0000000..4b2e646
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal54_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest54;
+SET
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal55_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal55_fail.ans b/src/test/feature/Ranger/ans/normal55_fail.ans
new file mode 100644
index 0000000..3b7a81d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal55_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest55;
+SET
+select getfoo();
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select getfoo();
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function getfoo() does not exist
+LINE 1: select getfoo();
+ ^
+HINT: No function matches the given name and argument types. You may need to add explicit type casts.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal55_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal55_success.ans b/src/test/feature/Ranger/ans/normal55_success.ans
new file mode 100644
index 0000000..90e172b
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal55_success.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest55;
+SET
+select getfoo();
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
[2/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Posted by hu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/15.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/15.sql b/src/test/feature/Ranger/sql/admin/15.sql
new file mode 100644
index 0000000..935baa5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/15.sql
@@ -0,0 +1,2 @@
+drop FUNCTION si_lt(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/16.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/16.sql b/src/test/feature/Ranger/sql/admin/16.sql
new file mode 100644
index 0000000..99c08ee
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/16.sql
@@ -0,0 +1,2 @@
+drop FUNCTION normalize_si(text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/17.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/17.sql b/src/test/feature/Ranger/sql/admin/17.sql
new file mode 100644
index 0000000..84d8ed2
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/17.sql
@@ -0,0 +1,2 @@
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/18.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/18.sql b/src/test/feature/Ranger/sql/admin/18.sql
new file mode 100644
index 0000000..3a4aedc
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/18.sql
@@ -0,0 +1,2 @@
+DROP RESOURCE QUEUE myqueue;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/19.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/19.sql b/src/test/feature/Ranger/sql/admin/19.sql
new file mode 100644
index 0000000..a8563c4
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/19.sql
@@ -0,0 +1,2 @@
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/2.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/2.sql b/src/test/feature/Ranger/sql/admin/2.sql
new file mode 100644
index 0000000..f66cf7a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/2.sql
@@ -0,0 +1,2 @@
+create language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/20.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/20.sql b/src/test/feature/Ranger/sql/admin/20.sql
new file mode 100644
index 0000000..a2e59f1
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/20.sql
@@ -0,0 +1,2 @@
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/21.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/21.sql b/src/test/feature/Ranger/sql/admin/21.sql
new file mode 100644
index 0000000..6b750fd
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/21.sql
@@ -0,0 +1,2 @@
+insert into foo(i) values(1234);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/22.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/22.sql b/src/test/feature/Ranger/sql/admin/22.sql
new file mode 100644
index 0000000..881831c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/22.sql
@@ -0,0 +1,2 @@
+drop table foo;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/23.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/23.sql b/src/test/feature/Ranger/sql/admin/23.sql
new file mode 100644
index 0000000..2049d96
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/23.sql
@@ -0,0 +1,2 @@
+drop tablespace mytblspace;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/24.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/24.sql b/src/test/feature/Ranger/sql/admin/24.sql
new file mode 100644
index 0000000..3b84fc9
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/24.sql
@@ -0,0 +1,2 @@
+COPY a FROM '/tmp/a.txt';
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/25.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/25.sql b/src/test/feature/Ranger/sql/admin/25.sql
new file mode 100644
index 0000000..fdef22f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/25.sql
@@ -0,0 +1,2 @@
+COPY a TO STDOUT WITH DELIMITER '|';
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/26.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/26.sql b/src/test/feature/Ranger/sql/admin/26.sql
new file mode 100644
index 0000000..b3602e6
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/26.sql
@@ -0,0 +1,2 @@
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/27.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/27.sql b/src/test/feature/Ranger/sql/admin/27.sql
new file mode 100644
index 0000000..9e1d5b5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/27.sql
@@ -0,0 +1,2 @@
+select * from ext_t order by N_NATIONKEY;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/28.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/28.sql b/src/test/feature/Ranger/sql/admin/28.sql
new file mode 100644
index 0000000..2cf4d94
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/28.sql
@@ -0,0 +1,2 @@
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/29.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/29.sql b/src/test/feature/Ranger/sql/admin/29.sql
new file mode 100644
index 0000000..a7ce08c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/29.sql
@@ -0,0 +1,2 @@
+insert into ext_t2(i) values(234);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/3.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/3.sql b/src/test/feature/Ranger/sql/admin/3.sql
new file mode 100644
index 0000000..60256d1
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/3.sql
@@ -0,0 +1,2 @@
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/30.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/30.sql b/src/test/feature/Ranger/sql/admin/30.sql
new file mode 100644
index 0000000..cdb6310
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/30.sql
@@ -0,0 +1,2 @@
+drop EXTERNAL TABLE ext_t;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/31.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/31.sql b/src/test/feature/Ranger/sql/admin/31.sql
new file mode 100644
index 0000000..78c3bac
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/31.sql
@@ -0,0 +1,2 @@
+drop EXTERNAL TABLE ext_t2;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/32.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/32.sql b/src/test/feature/Ranger/sql/admin/32.sql
new file mode 100644
index 0000000..22f3d94
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/32.sql
@@ -0,0 +1,2 @@
+create schema sa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/33.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/33.sql b/src/test/feature/Ranger/sql/admin/33.sql
new file mode 100644
index 0000000..1ecbb3d
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/33.sql
@@ -0,0 +1,2 @@
+create temp table ta(i int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/34.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/34.sql b/src/test/feature/Ranger/sql/admin/34.sql
new file mode 100644
index 0000000..60553a7
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/34.sql
@@ -0,0 +1,2 @@
+create view av as select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/35.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/35.sql b/src/test/feature/Ranger/sql/admin/35.sql
new file mode 100644
index 0000000..c6980eb
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/35.sql
@@ -0,0 +1,2 @@
+create table aa as select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/36.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/36.sql b/src/test/feature/Ranger/sql/admin/36.sql
new file mode 100644
index 0000000..72650fc
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/36.sql
@@ -0,0 +1,2 @@
+create table sa.t(a int, b int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/37.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/37.sql b/src/test/feature/Ranger/sql/admin/37.sql
new file mode 100644
index 0000000..b468240
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/37.sql
@@ -0,0 +1,2 @@
+CREATE SEQUENCE myseq START 1;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/38.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/38.sql b/src/test/feature/Ranger/sql/admin/38.sql
new file mode 100644
index 0000000..e853d79
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/38.sql
@@ -0,0 +1,2 @@
+insert into a values(1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/39.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/39.sql b/src/test/feature/Ranger/sql/admin/39.sql
new file mode 100644
index 0000000..e853d79
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/39.sql
@@ -0,0 +1,2 @@
+insert into a values(1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/4.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/4.sql b/src/test/feature/Ranger/sql/admin/4.sql
new file mode 100644
index 0000000..0cf5902
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/4.sql
@@ -0,0 +1,2 @@
+select * from f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/40.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/40.sql b/src/test/feature/Ranger/sql/admin/40.sql
new file mode 100644
index 0000000..b40f4c6
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/40.sql
@@ -0,0 +1,2 @@
+insert into a VALUES (nextval('myseq'));
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/41.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/41.sql b/src/test/feature/Ranger/sql/admin/41.sql
new file mode 100644
index 0000000..385baa2
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/41.sql
@@ -0,0 +1,2 @@
+select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/42.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/42.sql b/src/test/feature/Ranger/sql/admin/42.sql
new file mode 100644
index 0000000..4ceed17
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/42.sql
@@ -0,0 +1,2 @@
+select generate_series(1,3);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/43.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/43.sql b/src/test/feature/Ranger/sql/admin/43.sql
new file mode 100644
index 0000000..480e607
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/43.sql
@@ -0,0 +1,2 @@
+select * from av;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/44.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/44.sql b/src/test/feature/Ranger/sql/admin/44.sql
new file mode 100644
index 0000000..a45225c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/44.sql
@@ -0,0 +1,2 @@
+SELECT setval('myseq', 1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/45.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/45.sql b/src/test/feature/Ranger/sql/admin/45.sql
new file mode 100644
index 0000000..22834c8
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/45.sql
@@ -0,0 +1,2 @@
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/46.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/46.sql b/src/test/feature/Ranger/sql/admin/46.sql
new file mode 100644
index 0000000..2065b88
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/46.sql
@@ -0,0 +1,2 @@
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/47.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/47.sql b/src/test/feature/Ranger/sql/admin/47.sql
new file mode 100644
index 0000000..e4e2c41
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/47.sql
@@ -0,0 +1,2 @@
+explain select * from a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/48.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/48.sql b/src/test/feature/Ranger/sql/admin/48.sql
new file mode 100644
index 0000000..9f2f20a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/48.sql
@@ -0,0 +1,2 @@
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/49.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/49.sql b/src/test/feature/Ranger/sql/admin/49.sql
new file mode 100644
index 0000000..e6599f1
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/49.sql
@@ -0,0 +1,2 @@
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/5.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/5.sql b/src/test/feature/Ranger/sql/admin/5.sql
new file mode 100644
index 0000000..c9c075d
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/5.sql
@@ -0,0 +1,2 @@
+drop function f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/50.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/50.sql b/src/test/feature/Ranger/sql/admin/50.sql
new file mode 100644
index 0000000..993576b
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/50.sql
@@ -0,0 +1,2 @@
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/51.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/51.sql b/src/test/feature/Ranger/sql/admin/51.sql
new file mode 100644
index 0000000..b05f5ac
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/51.sql
@@ -0,0 +1,2 @@
+DROP AGGREGATE scube2(numeric);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/52.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/52.sql b/src/test/feature/Ranger/sql/admin/52.sql
new file mode 100644
index 0000000..3b29f9a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/52.sql
@@ -0,0 +1,2 @@
+DROP FUNCTION scube_accum(numeric, numeric);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/53.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/53.sql b/src/test/feature/Ranger/sql/admin/53.sql
new file mode 100644
index 0000000..0707842
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/53.sql
@@ -0,0 +1,2 @@
+CREATE TYPE mytype AS (f1 int, f2 int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/54.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/54.sql b/src/test/feature/Ranger/sql/admin/54.sql
new file mode 100644
index 0000000..ea91e5a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/54.sql
@@ -0,0 +1,2 @@
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/55.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/55.sql b/src/test/feature/Ranger/sql/admin/55.sql
new file mode 100644
index 0000000..ff62421
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/55.sql
@@ -0,0 +1,2 @@
+select getfoo();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/56.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/56.sql b/src/test/feature/Ranger/sql/admin/56.sql
new file mode 100644
index 0000000..9704249
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/56.sql
@@ -0,0 +1,2 @@
+drop type mytype cascade;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/57.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/57.sql b/src/test/feature/Ranger/sql/admin/57.sql
new file mode 100644
index 0000000..9a3466c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/57.sql
@@ -0,0 +1,2 @@
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/58.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/58.sql b/src/test/feature/Ranger/sql/admin/58.sql
new file mode 100644
index 0000000..8909ac0
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/58.sql
@@ -0,0 +1,2 @@
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/59.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/59.sql b/src/test/feature/Ranger/sql/admin/59.sql
new file mode 100644
index 0000000..7082e2b
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/59.sql
@@ -0,0 +1,2 @@
+\d
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/6.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/6.sql b/src/test/feature/Ranger/sql/admin/6.sql
new file mode 100644
index 0000000..ca4991c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/6.sql
@@ -0,0 +1,2 @@
+drop language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/60.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/60.sql b/src/test/feature/Ranger/sql/admin/60.sql
new file mode 100644
index 0000000..10d68f3
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/60.sql
@@ -0,0 +1,2 @@
+analyze a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/61.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/61.sql b/src/test/feature/Ranger/sql/admin/61.sql
new file mode 100644
index 0000000..ab2560b
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/61.sql
@@ -0,0 +1,2 @@
+analyze;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/62.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/62.sql b/src/test/feature/Ranger/sql/admin/62.sql
new file mode 100644
index 0000000..afb4bd5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/62.sql
@@ -0,0 +1,2 @@
+vacuum aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/63.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/63.sql b/src/test/feature/Ranger/sql/admin/63.sql
new file mode 100644
index 0000000..70f7c2a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/63.sql
@@ -0,0 +1,2 @@
+vacuum analyze;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/64.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/64.sql b/src/test/feature/Ranger/sql/admin/64.sql
new file mode 100644
index 0000000..addef79
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/64.sql
@@ -0,0 +1,2 @@
+truncate aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/65.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/65.sql b/src/test/feature/Ranger/sql/admin/65.sql
new file mode 100644
index 0000000..3785597
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/65.sql
@@ -0,0 +1,2 @@
+alter table a rename column i to j;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/66.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/66.sql b/src/test/feature/Ranger/sql/admin/66.sql
new file mode 100644
index 0000000..c684900
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/66.sql
@@ -0,0 +1,2 @@
+drop SEQUENCE myseq;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/67.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/67.sql b/src/test/feature/Ranger/sql/admin/67.sql
new file mode 100644
index 0000000..faeb08f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/67.sql
@@ -0,0 +1,2 @@
+drop view av;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/68.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/68.sql b/src/test/feature/Ranger/sql/admin/68.sql
new file mode 100644
index 0000000..3647118
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/68.sql
@@ -0,0 +1,2 @@
+drop table aaa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/69.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/69.sql b/src/test/feature/Ranger/sql/admin/69.sql
new file mode 100644
index 0000000..a99bd9d
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/69.sql
@@ -0,0 +1,2 @@
+drop table aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/7.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/7.sql b/src/test/feature/Ranger/sql/admin/7.sql
new file mode 100644
index 0000000..6a4725c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/7.sql
@@ -0,0 +1,2 @@
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/70.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/70.sql b/src/test/feature/Ranger/sql/admin/70.sql
new file mode 100644
index 0000000..e5b6025
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/70.sql
@@ -0,0 +1,2 @@
+drop table a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/71.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/71.sql b/src/test/feature/Ranger/sql/admin/71.sql
new file mode 100644
index 0000000..5aac8ba
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/71.sql
@@ -0,0 +1,2 @@
+drop schema sa CASCADE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/8.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/8.sql b/src/test/feature/Ranger/sql/admin/8.sql
new file mode 100644
index 0000000..c584d07
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/8.sql
@@ -0,0 +1,2 @@
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/9.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/9.sql b/src/test/feature/Ranger/sql/admin/9.sql
new file mode 100644
index 0000000..13b9067
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/9.sql
@@ -0,0 +1,2 @@
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/init_file
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/init_file b/src/test/feature/Ranger/sql/init_file
new file mode 100644
index 0000000..3c1fd76
--- /dev/null
+++ b/src/test/feature/Ranger/sql/init_file
@@ -0,0 +1,7 @@
+-- start_matchignore
+m/You are now connected to database*/
+s/public\|a\|table\|.*\|append only/public\|a\|table\|gpadmin\|append only/
+s/public\|aa\|table\|.*\|append only/public\|aa\|table\|gpadmin\|append only/
+s/public\|aaa\|table\|.*\|append only/public\|aaa\|table\|gpadmin\|append only/
+s/public\|av\|view\|.*\|none/public\|av\|view\|gpadmin\|none/
+-- end_matchignore
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/1.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/1.sql b/src/test/feature/Ranger/sql/normal/1.sql
new file mode 100644
index 0000000..33f1fbe
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/1.sql
@@ -0,0 +1,3 @@
+set session role=usertest1;
+create table a(i int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/10.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/10.sql b/src/test/feature/Ranger/sql/normal/10.sql
new file mode 100644
index 0000000..355aba0
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/10.sql
@@ -0,0 +1,3 @@
+set session role=usertest10;
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/11.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/11.sql b/src/test/feature/Ranger/sql/normal/11.sql
new file mode 100644
index 0000000..8e43dbd
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/11.sql
@@ -0,0 +1,3 @@
+set session role=usertest11;
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/12.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/12.sql b/src/test/feature/Ranger/sql/normal/12.sql
new file mode 100644
index 0000000..be948a3
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/12.sql
@@ -0,0 +1,3 @@
+set session role=usertest12;
+drop OPERATOR CLASS sva_special_ops USING btree;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/13.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/13.sql b/src/test/feature/Ranger/sql/normal/13.sql
new file mode 100644
index 0000000..7258043
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/13.sql
@@ -0,0 +1,3 @@
+set session role=usertest13;
+drop OPERATOR <# (text,text) CASCADE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/14.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/14.sql b/src/test/feature/Ranger/sql/normal/14.sql
new file mode 100644
index 0000000..8bd2dee
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/14.sql
@@ -0,0 +1,3 @@
+set session role=usertest14;
+drop FUNCTION si_same(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/15.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/15.sql b/src/test/feature/Ranger/sql/normal/15.sql
new file mode 100644
index 0000000..6c69d24
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/15.sql
@@ -0,0 +1,3 @@
+set session role=usertest15;
+drop FUNCTION si_lt(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/16.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/16.sql b/src/test/feature/Ranger/sql/normal/16.sql
new file mode 100644
index 0000000..fd7aca5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/16.sql
@@ -0,0 +1,3 @@
+set session role=usertest16;
+drop FUNCTION normalize_si(text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/17.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/17.sql b/src/test/feature/Ranger/sql/normal/17.sql
new file mode 100644
index 0000000..42de8bb
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/17.sql
@@ -0,0 +1,3 @@
+set session role=usertest17;
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/18.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/18.sql b/src/test/feature/Ranger/sql/normal/18.sql
new file mode 100644
index 0000000..f2c5d5e
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/18.sql
@@ -0,0 +1,3 @@
+set session role=usertest18;
+DROP RESOURCE QUEUE myqueue;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/19.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/19.sql b/src/test/feature/Ranger/sql/normal/19.sql
new file mode 100644
index 0000000..79b9ce0
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/19.sql
@@ -0,0 +1,3 @@
+set session role=usertest19;
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/2.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/2.sql b/src/test/feature/Ranger/sql/normal/2.sql
new file mode 100644
index 0000000..8d579a5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/2.sql
@@ -0,0 +1,3 @@
+set session role=usertest2;
+create language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/20.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/20.sql b/src/test/feature/Ranger/sql/normal/20.sql
new file mode 100644
index 0000000..b0a09cc
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/20.sql
@@ -0,0 +1,3 @@
+set session role=usertest20;
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/21.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/21.sql b/src/test/feature/Ranger/sql/normal/21.sql
new file mode 100644
index 0000000..0816560
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/21.sql
@@ -0,0 +1,3 @@
+set session role=usertest21;
+insert into foo(i) values(1234);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/22.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/22.sql b/src/test/feature/Ranger/sql/normal/22.sql
new file mode 100644
index 0000000..b55b462
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/22.sql
@@ -0,0 +1,3 @@
+set session role=usertest22;
+drop table foo;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/23.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/23.sql b/src/test/feature/Ranger/sql/normal/23.sql
new file mode 100644
index 0000000..1552795
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/23.sql
@@ -0,0 +1,3 @@
+set session role=usertest23;
+drop tablespace mytblspace;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/24.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/24.sql b/src/test/feature/Ranger/sql/normal/24.sql
new file mode 100644
index 0000000..7be148c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/24.sql
@@ -0,0 +1,3 @@
+set session role=usertest24;
+COPY a FROM '/tmp/a.txt';
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/25.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/25.sql b/src/test/feature/Ranger/sql/normal/25.sql
new file mode 100644
index 0000000..d02f191
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/25.sql
@@ -0,0 +1,3 @@
+set session role=usertest25;
+COPY a TO STDOUT WITH DELIMITER '|';
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/26.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/26.sql b/src/test/feature/Ranger/sql/normal/26.sql
new file mode 100644
index 0000000..7faf754
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/26.sql
@@ -0,0 +1,3 @@
+set session role=usertest26;
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/27.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/27.sql b/src/test/feature/Ranger/sql/normal/27.sql
new file mode 100644
index 0000000..4f8707b
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/27.sql
@@ -0,0 +1,3 @@
+set session role=usertest27;
+select * from ext_t order by N_NATIONKEY;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/28.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/28.sql b/src/test/feature/Ranger/sql/normal/28.sql
new file mode 100644
index 0000000..77b0359
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/28.sql
@@ -0,0 +1,3 @@
+set session role=usertest28;
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/29.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/29.sql b/src/test/feature/Ranger/sql/normal/29.sql
new file mode 100644
index 0000000..b3a7902
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/29.sql
@@ -0,0 +1,3 @@
+set session role=usertest29;
+insert into ext_t2(i) values(234);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/3.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/3.sql b/src/test/feature/Ranger/sql/normal/3.sql
new file mode 100644
index 0000000..30e7f5c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/3.sql
@@ -0,0 +1,3 @@
+set session role=usertest3;
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/30.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/30.sql b/src/test/feature/Ranger/sql/normal/30.sql
new file mode 100644
index 0000000..2c455bc
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/30.sql
@@ -0,0 +1,3 @@
+set session role=usertest30;
+drop EXTERNAL TABLE ext_t;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/31.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/31.sql b/src/test/feature/Ranger/sql/normal/31.sql
new file mode 100644
index 0000000..b218472
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/31.sql
@@ -0,0 +1,3 @@
+set session role=usertest31;
+drop EXTERNAL TABLE ext_t2;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/32.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/32.sql b/src/test/feature/Ranger/sql/normal/32.sql
new file mode 100644
index 0000000..6cbc67c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/32.sql
@@ -0,0 +1,3 @@
+set session role=usertest32;
+create schema sa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/33.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/33.sql b/src/test/feature/Ranger/sql/normal/33.sql
new file mode 100644
index 0000000..8e86e46
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/33.sql
@@ -0,0 +1,3 @@
+set session role=usertest33;
+create temp table ta(i int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/34.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/34.sql b/src/test/feature/Ranger/sql/normal/34.sql
new file mode 100644
index 0000000..c943817
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/34.sql
@@ -0,0 +1,3 @@
+set session role=usertest34;
+create view av as select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/35.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/35.sql b/src/test/feature/Ranger/sql/normal/35.sql
new file mode 100644
index 0000000..39288f6
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/35.sql
@@ -0,0 +1,3 @@
+set session role=usertest35;
+create table aa as select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/36.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/36.sql b/src/test/feature/Ranger/sql/normal/36.sql
new file mode 100644
index 0000000..2c6e709
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/36.sql
@@ -0,0 +1,3 @@
+set session role=usertest36;
+create table sa.t(a int, b int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/37.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/37.sql b/src/test/feature/Ranger/sql/normal/37.sql
new file mode 100644
index 0000000..e25808d
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/37.sql
@@ -0,0 +1,3 @@
+set session role=usertest37;
+CREATE SEQUENCE myseq START 1;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/38.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/38.sql b/src/test/feature/Ranger/sql/normal/38.sql
new file mode 100644
index 0000000..7669aa6
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/38.sql
@@ -0,0 +1,3 @@
+set session role=usertest38;
+insert into a values(1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/39.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/39.sql b/src/test/feature/Ranger/sql/normal/39.sql
new file mode 100644
index 0000000..a211d00
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/39.sql
@@ -0,0 +1,3 @@
+set session role=usertest39;
+insert into a values(1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/4.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/4.sql b/src/test/feature/Ranger/sql/normal/4.sql
new file mode 100644
index 0000000..25b8c3e
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/4.sql
@@ -0,0 +1,3 @@
+set session role=usertest4;
+select * from f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/40.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/40.sql b/src/test/feature/Ranger/sql/normal/40.sql
new file mode 100644
index 0000000..cb0ca4a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/40.sql
@@ -0,0 +1,3 @@
+set session role=usertest40;
+insert into a VALUES (nextval('myseq'));
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/41.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/41.sql b/src/test/feature/Ranger/sql/normal/41.sql
new file mode 100644
index 0000000..57bb612
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/41.sql
@@ -0,0 +1,3 @@
+set session role=usertest41;
+select * from a order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/42.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/42.sql b/src/test/feature/Ranger/sql/normal/42.sql
new file mode 100644
index 0000000..73dee45
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/42.sql
@@ -0,0 +1,3 @@
+set session role=usertest42;
+select generate_series(1,3);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/43.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/43.sql b/src/test/feature/Ranger/sql/normal/43.sql
new file mode 100644
index 0000000..07576a8
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/43.sql
@@ -0,0 +1,3 @@
+set session role=usertest43;
+select * from av;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/44.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/44.sql b/src/test/feature/Ranger/sql/normal/44.sql
new file mode 100644
index 0000000..336b7c5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/44.sql
@@ -0,0 +1,3 @@
+set session role=usertest44;
+SELECT setval('myseq', 1);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/45.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/45.sql b/src/test/feature/Ranger/sql/normal/45.sql
new file mode 100644
index 0000000..78befd1
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/45.sql
@@ -0,0 +1,3 @@
+set session role=usertest45;
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/46.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/46.sql b/src/test/feature/Ranger/sql/normal/46.sql
new file mode 100644
index 0000000..e40a5b2
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/46.sql
@@ -0,0 +1,3 @@
+set session role=usertest46;
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/47.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/47.sql b/src/test/feature/Ranger/sql/normal/47.sql
new file mode 100644
index 0000000..9955c57
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/47.sql
@@ -0,0 +1,3 @@
+set session role=usertest47;
+explain select * from a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/48.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/48.sql b/src/test/feature/Ranger/sql/normal/48.sql
new file mode 100644
index 0000000..0b288fc
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/48.sql
@@ -0,0 +1,3 @@
+set session role=usertest48;
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/49.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/49.sql b/src/test/feature/Ranger/sql/normal/49.sql
new file mode 100644
index 0000000..08dd254
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/49.sql
@@ -0,0 +1,3 @@
+set session role=usertest49;
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/5.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/5.sql b/src/test/feature/Ranger/sql/normal/5.sql
new file mode 100644
index 0000000..0d994c4
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/5.sql
@@ -0,0 +1,3 @@
+set session role=usertest5;
+drop function f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/50.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/50.sql b/src/test/feature/Ranger/sql/normal/50.sql
new file mode 100644
index 0000000..2ba3d49
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/50.sql
@@ -0,0 +1,3 @@
+set session role=usertest50;
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/51.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/51.sql b/src/test/feature/Ranger/sql/normal/51.sql
new file mode 100644
index 0000000..11a0cd7
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/51.sql
@@ -0,0 +1,3 @@
+set session role=usertest51;
+DROP AGGREGATE scube2(numeric);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/52.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/52.sql b/src/test/feature/Ranger/sql/normal/52.sql
new file mode 100644
index 0000000..a35aa9d
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/52.sql
@@ -0,0 +1,3 @@
+set session role=usertest52;
+DROP FUNCTION scube_accum(numeric, numeric);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/53.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/53.sql b/src/test/feature/Ranger/sql/normal/53.sql
new file mode 100644
index 0000000..bac2fae
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/53.sql
@@ -0,0 +1,3 @@
+set session role=usertest53;
+CREATE TYPE mytype AS (f1 int, f2 int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/54.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/54.sql b/src/test/feature/Ranger/sql/normal/54.sql
new file mode 100644
index 0000000..0400efa
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/54.sql
@@ -0,0 +1,3 @@
+set session role=usertest54;
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/55.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/55.sql b/src/test/feature/Ranger/sql/normal/55.sql
new file mode 100644
index 0000000..736b763
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/55.sql
@@ -0,0 +1,3 @@
+set session role=usertest55;
+select getfoo();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/56.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/56.sql b/src/test/feature/Ranger/sql/normal/56.sql
new file mode 100644
index 0000000..364990f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/56.sql
@@ -0,0 +1,3 @@
+set session role=usertest56;
+drop type mytype cascade;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/57.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/57.sql b/src/test/feature/Ranger/sql/normal/57.sql
new file mode 100644
index 0000000..c15fab7
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/57.sql
@@ -0,0 +1,3 @@
+set session role=usertest57;
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/58.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/58.sql b/src/test/feature/Ranger/sql/normal/58.sql
new file mode 100644
index 0000000..6f80c61
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/58.sql
@@ -0,0 +1,3 @@
+set session role=usertest58;
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/59.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/59.sql b/src/test/feature/Ranger/sql/normal/59.sql
new file mode 100644
index 0000000..84aaed5
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/59.sql
@@ -0,0 +1,3 @@
+set session role=usertest59;
+\d
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/6.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/6.sql b/src/test/feature/Ranger/sql/normal/6.sql
new file mode 100644
index 0000000..869fbba
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/6.sql
@@ -0,0 +1,3 @@
+set session role=usertest6;
+drop language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/60.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/60.sql b/src/test/feature/Ranger/sql/normal/60.sql
new file mode 100644
index 0000000..1ac8008
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/60.sql
@@ -0,0 +1,3 @@
+set session role=usertest60;
+analyze a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/61.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/61.sql b/src/test/feature/Ranger/sql/normal/61.sql
new file mode 100644
index 0000000..e133a98
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/61.sql
@@ -0,0 +1,3 @@
+set session role=usertest61;
+analyze;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/62.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/62.sql b/src/test/feature/Ranger/sql/normal/62.sql
new file mode 100644
index 0000000..5fa3659
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/62.sql
@@ -0,0 +1,3 @@
+set session role=usertest62;
+vacuum aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/63.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/63.sql b/src/test/feature/Ranger/sql/normal/63.sql
new file mode 100644
index 0000000..d480630
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/63.sql
@@ -0,0 +1,3 @@
+set session role=usertest63;
+vacuum analyze;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/64.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/64.sql b/src/test/feature/Ranger/sql/normal/64.sql
new file mode 100644
index 0000000..26aca9e
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/64.sql
@@ -0,0 +1,3 @@
+set session role=usertest64;
+truncate aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/65.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/65.sql b/src/test/feature/Ranger/sql/normal/65.sql
new file mode 100644
index 0000000..6db582c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/65.sql
@@ -0,0 +1,3 @@
+set session role=usertest65;
+alter table a rename column i to j;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/66.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/66.sql b/src/test/feature/Ranger/sql/normal/66.sql
new file mode 100644
index 0000000..7637754
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/66.sql
@@ -0,0 +1,3 @@
+set session role=usertest66;
+drop SEQUENCE myseq;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/67.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/67.sql b/src/test/feature/Ranger/sql/normal/67.sql
new file mode 100644
index 0000000..a88a61f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/67.sql
@@ -0,0 +1,3 @@
+set session role=usertest67;
+drop view av;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/68.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/68.sql b/src/test/feature/Ranger/sql/normal/68.sql
new file mode 100644
index 0000000..cc322ad
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/68.sql
@@ -0,0 +1,3 @@
+set session role=usertest68;
+drop table aaa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/69.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/69.sql b/src/test/feature/Ranger/sql/normal/69.sql
new file mode 100644
index 0000000..d252050
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/69.sql
@@ -0,0 +1,3 @@
+set session role=usertest69;
+drop table aa;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/7.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/7.sql b/src/test/feature/Ranger/sql/normal/7.sql
new file mode 100644
index 0000000..47ebd4b
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/7.sql
@@ -0,0 +1,3 @@
+set session role=usertest7;
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/70.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/70.sql b/src/test/feature/Ranger/sql/normal/70.sql
new file mode 100644
index 0000000..620cc97
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/70.sql
@@ -0,0 +1,3 @@
+set session role=usertest70;
+drop table a;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/71.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/71.sql b/src/test/feature/Ranger/sql/normal/71.sql
new file mode 100644
index 0000000..a0600ca
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/71.sql
@@ -0,0 +1,3 @@
+set session role=usertest71;
+drop schema sa CASCADE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/8.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/8.sql b/src/test/feature/Ranger/sql/normal/8.sql
new file mode 100644
index 0000000..cf1ddf8
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/8.sql
@@ -0,0 +1,3 @@
+set session role=usertest8;
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/normal/9.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/normal/9.sql b/src/test/feature/Ranger/sql/normal/9.sql
new file mode 100644
index 0000000..b001581
--- /dev/null
+++ b/src/test/feature/Ranger/sql/normal/9.sql
@@ -0,0 +1,3 @@
+set session role=usertest9;
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/sqlsplit.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/sqlsplit.cpp b/src/test/feature/Ranger/sql/sqlsplit.cpp
new file mode 100644
index 0000000..61ea00e
--- /dev/null
+++ b/src/test/feature/Ranger/sql/sqlsplit.cpp
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int main() {
+ FILE *fin, *fout, *foutsuper;
+ fin = fopen("sqlsplitinput", "r");
+ char line[1000];
+ int i = 0;
+ int isnormalquery = 0;
+ while (fscanf(fin, "%d\n", &isnormalquery) && fgets(line, 1000, fin) != NULL) {
+ i++;
+
+ char sqlname[100];
+ sprintf(sqlname, "normal/%d.sql", i);
+ fout = fopen(sqlname, "w");
+ fprintf(fout, "set session role=usertest%d;\n", i);
+ fprintf(fout, "%s\n", line);
+ fclose(fout);
+
+ {
+ char sqlname[100];
+ sprintf(sqlname, "../ans/normal%d_fail.ans", i);
+ fout = fopen(sqlname, "w");
+ fclose(fout);
+ }
+
+ {
+ char sqlname[100];
+ sprintf(sqlname, "../ans/super%d_fail.ans", i);
+ fout = fopen(sqlname, "w");
+ fclose(fout);
+ }
+
+ {
+ char sqlname[100];
+ sprintf(sqlname, "../ans/normal%d_success.ans", i);
+ fout = fopen(sqlname, "w");
+ fclose(fout);
+ }
+
+ {
+ char sqlname[100];
+ sprintf(sqlname, "../ans/super%d_success.ans", i);
+ fout = fopen(sqlname, "w");
+ fclose(fout);
+ }
+ {
+ char sqlname[100];
+ sprintf(sqlname, "../ans/admin%d.ans", i);
+ fout = fopen(sqlname, "w");
+ fclose(fout);
+ }
+
+
+
+ if (!isnormalquery){
+ char sqlnamesuper[100];
+ sprintf(sqlnamesuper, "super/%d.sql", i);
+ foutsuper = fopen(sqlnamesuper, "w");
+ fprintf(foutsuper, "set session role=usersuper%d;\n", i);
+ fprintf(foutsuper, "%s\n", line);
+ fclose(foutsuper);
+ }
+
+ char sqlnameadmin[100];
+ sprintf(sqlnameadmin, "admin/%d.sql", i);
+ fout = fopen(sqlnameadmin, "w");
+ fprintf(fout, "%s\n", line);
+ fclose(fout);
+ }
+ fclose(fin);
+}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/sqlsplitinput
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/sqlsplitinput b/src/test/feature/Ranger/sql/sqlsplitinput
new file mode 100644
index 0000000..564b0a0
--- /dev/null
+++ b/src/test/feature/Ranger/sql/sqlsplitinput
@@ -0,0 +1,142 @@
+1
+create table a(i int);
+0
+create language plpythonu;
+0
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+1
+select * from f4();
+0
+drop function f4();
+0
+drop language plpythonu;
+1
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+1
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+1
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+1
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+0
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+0
+drop OPERATOR CLASS sva_special_ops USING btree;
+1
+drop OPERATOR <# (text,text) CASCADE;
+1
+drop FUNCTION si_same(text, text);
+1
+drop FUNCTION si_lt(text, text);
+1
+drop FUNCTION normalize_si(text);
+0
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+0
+DROP RESOURCE QUEUE myqueue;
+0
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+1
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+1
+insert into foo(i) values(1234);
+1
+drop table foo;
+0
+drop tablespace mytblspace;
+0
+COPY a FROM '/tmp/a.txt';
+1
+COPY a TO STDOUT WITH DELIMITER '|';
+1
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+1
+select * from ext_t order by N_NATIONKEY;
+1
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+1
+insert into ext_t2(i) values(234);
+1
+drop EXTERNAL TABLE ext_t;
+1
+drop EXTERNAL TABLE ext_t2;
+1
+create schema sa;
+1
+create temp table ta(i int);
+1
+create view av as select * from a order by i;
+1
+create table aa as select * from a order by i;
+1
+create table sa.t(a int, b int);
+1
+CREATE SEQUENCE myseq START 1;
+1
+insert into a values(1);
+1
+insert into a values(1);
+1
+insert into a VALUES (nextval('myseq'));
+1
+select * from a order by i;
+1
+select generate_series(1,3);
+1
+select * from av;
+1
+SELECT setval('myseq', 1);
+1
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+1
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+1
+explain select * from a;
+1
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+1
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+1
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+1
+DROP AGGREGATE scube2(numeric);
+1
+DROP FUNCTION scube_accum(numeric, numeric);
+1
+CREATE TYPE mytype AS (f1 int, f2 int);
+1
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+1
+select getfoo();
+1
+drop type mytype cascade;
+1
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+1
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+1
+\d
+1
+analyze a;
+1
+analyze;
+1
+vacuum aa;
+0
+vacuum analyze;
+1
+truncate aa;
+1
+alter table a rename column i to j;
+1
+drop SEQUENCE myseq;
+1
+drop view av;
+1
+drop table aaa;
+1
+drop table aa;
+1
+drop table a;
+1
+drop schema sa CASCADE;
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/11.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/11.sql b/src/test/feature/Ranger/sql/super/11.sql
new file mode 100644
index 0000000..dc1ebf7
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/11.sql
@@ -0,0 +1,3 @@
+set session role=usersuper11;
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/12.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/12.sql b/src/test/feature/Ranger/sql/super/12.sql
new file mode 100644
index 0000000..1caae8e
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/12.sql
@@ -0,0 +1,3 @@
+set session role=usersuper12;
+drop OPERATOR CLASS sva_special_ops USING btree;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/17.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/17.sql b/src/test/feature/Ranger/sql/super/17.sql
new file mode 100644
index 0000000..798e037
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/17.sql
@@ -0,0 +1,3 @@
+set session role=usersuper17;
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/18.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/18.sql b/src/test/feature/Ranger/sql/super/18.sql
new file mode 100644
index 0000000..e725d6f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/18.sql
@@ -0,0 +1,3 @@
+set session role=usersuper18;
+DROP RESOURCE QUEUE myqueue;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/19.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/19.sql b/src/test/feature/Ranger/sql/super/19.sql
new file mode 100644
index 0000000..8de36b0
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/19.sql
@@ -0,0 +1,3 @@
+set session role=usersuper19;
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/2.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/2.sql b/src/test/feature/Ranger/sql/super/2.sql
new file mode 100644
index 0000000..0ae854c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/2.sql
@@ -0,0 +1,3 @@
+set session role=usersuper2;
+create language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/23.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/23.sql b/src/test/feature/Ranger/sql/super/23.sql
new file mode 100644
index 0000000..f83c498
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/23.sql
@@ -0,0 +1,3 @@
+set session role=usersuper23;
+drop tablespace mytblspace;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/24.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/24.sql b/src/test/feature/Ranger/sql/super/24.sql
new file mode 100644
index 0000000..113c6fe
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/24.sql
@@ -0,0 +1,3 @@
+set session role=usersuper24;
+COPY a FROM '/tmp/a.txt';
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/3.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/3.sql b/src/test/feature/Ranger/sql/super/3.sql
new file mode 100644
index 0000000..fd1377c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/3.sql
@@ -0,0 +1,3 @@
+set session role=usersuper3;
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/5.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/5.sql b/src/test/feature/Ranger/sql/super/5.sql
new file mode 100644
index 0000000..a95e012
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/5.sql
@@ -0,0 +1,3 @@
+set session role=usersuper5;
+drop function f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/6.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/6.sql b/src/test/feature/Ranger/sql/super/6.sql
new file mode 100644
index 0000000..9dd3a0c
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/6.sql
@@ -0,0 +1,3 @@
+set session role=usersuper6;
+drop language plpythonu;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/super/63.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/super/63.sql b/src/test/feature/Ranger/sql/super/63.sql
new file mode 100644
index 0000000..463ce54
--- /dev/null
+++ b/src/test/feature/Ranger/sql/super/63.sql
@@ -0,0 +1,3 @@
+set session role=usersuper63;
+vacuum analyze;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/test_ranger.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/test_ranger.cpp b/src/test/feature/Ranger/test_ranger.cpp
new file mode 100644
index 0000000..1d9f08e
--- /dev/null
+++ b/src/test/feature/Ranger/test_ranger.cpp
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "test_ranger.h"
+
+#include <string>
+#include <pwd.h>
+
+#include "lib/command.h"
+#include "lib/gpfdist.h"
+#include "lib/sql_util.h"
+#include "lib/string_util.h"
+
+using std::vector;
+using std::string;
+using hawq::test::SQLUtility;
+using hawq::test::Command;
+
+TEST_F(TestHawqRanger, BasicTest) {
+ SQLUtility util;
+
+ if (util.getGUCValue("hawq_acl_type") == "ranger")
+ {
+ hawq::test::GPfdist gpdfist(&util);
+ gpdfist.init_gpfdist();
+
+ string rootPath(util.getTestRootPath());
+ string initfile = hawq::test::stringFormat("Ranger/sql/init_file");
+ auto cmd = hawq::test::stringFormat("ls -l %s/Ranger/sql/normal/*.sql 2>/dev/null | wc -l", rootPath.c_str());
+ int sql_num = std::atoi(Command::getCommandOutput(cmd).c_str());
+ int writableTableCase = 28;
+ string rangerHost = RANGER_HOST;
+ cmd = hawq::test::stringFormat("cp %s/Ranger/data/copydata.txt /tmp/a.txt", rootPath.c_str());
+ Command::getCommandStatus(cmd);
+
+ // clear environment
+ for (int i = 1; i <= sql_num; i++) {
+ // delete user_num
+ std::string normalusername = hawq::test::stringFormat("usertest%d", i);
+ std::string superusername = hawq::test::stringFormat("usersuper%d", i);
+ util.execute(hawq::test::stringFormat("drop role %s;",normalusername.c_str()), false);
+ util.execute(hawq::test::stringFormat("drop role %s;",superusername.c_str()), false);
+ // delete policy
+ std::string cmd = hawq::test::stringFormat("ls -l %s/Ranger/policy/%d/ 2>/dev/null| grep \"^-\" | wc -l ", rootPath.c_str(), i);
+ int policy_num = std::atoi(Command::getCommandOutput(cmd).c_str());
+ for (int j = 1; j <= policy_num; j++) {
+ cmd = hawq::test::stringFormat("python %s/Ranger/rangerpolicy.py -h %s -d policy%d-%d", rootPath.c_str(), rangerHost.c_str(), i, j);
+ Command::getCommandStatus(cmd);
+ }
+ }
+
+ for (int i = 1; i <= sql_num; i++) {
+ // create user_num
+ std::string superusername = hawq::test::stringFormat("usersuper%d", i);;
+ std::string normalusername = hawq::test::stringFormat("usertest%d", i);;
+ util.execute(hawq::test::stringFormat("create role %s with login createdb superuser;", superusername.c_str()),true);
+ if(i == writableTableCase) { //for writable external table
+ util.execute(hawq::test::stringFormat("create role %s with login createdb CREATEEXTTABLE(type='writable') CREATEROLE;", normalusername.c_str()),true);
+ }
+ else {
+ util.execute(hawq::test::stringFormat("create role %s with login createdb CREATEEXTTABLE CREATEROLE;", normalusername.c_str()),true);
+ }
+ cmd = hawq::test::stringFormat("python %s/Ranger/rangeruser.py -h %s -u %s,%s", rootPath.c_str(),
+ rangerHost.c_str(),normalusername.c_str(), superusername.c_str());
+ Command::getCommandStatus(cmd);
+
+ //run sql by different users
+ string normal_sqlfile = hawq::test::stringFormat("Ranger/sql/normal/%d.sql", i);
+ string super_sqlfile = hawq::test::stringFormat("Ranger/sql/super/%d.sql", i);
+ string admin_sqlfile = hawq::test::stringFormat("Ranger/sql/admin/%d.sql", i);
+ string normal_ansfile_fail = hawq::test::stringFormat("Ranger/ans/normal%d_fail.ans", i);
+ string super_ansfile_fail = hawq::test::stringFormat("Ranger/ans/super%d_fail.ans", i);
+ string admin_ansfile = hawq::test::stringFormat("Ranger/ans/adminfirst%d.ans", i);
+
+ cmd = hawq::test::stringFormat("ls -l %s/Ranger/policy/%d/ 2>/dev/null| wc -l", rootPath.c_str(), i);
+ int policy_num = std::atoi(Command::getCommandOutput(cmd).c_str());
+
+ cmd = hawq::test::stringFormat("ls -l %s/Ranger/sql/super/%d.sql 2>/dev/null| wc -l", rootPath.c_str(), i);
+ int supersqlexist = std::atoi(Command::getCommandOutput(cmd).c_str());
+
+ if (policy_num > 0){
+ if (supersqlexist) {
+ util.execSQLFile(super_sqlfile, super_ansfile_fail, initfile, true, true);
+ }
+ else {
+ util.execSQLFile(normal_sqlfile, normal_ansfile_fail, initfile, true, true);
+ }
+ }
+
+ util.execSQLFile(admin_sqlfile, admin_ansfile, initfile, true, true);
+
+
+ for (int j = 1; j <= policy_num; j++) {
+ cmd = hawq::test::stringFormat("python %s/Ranger/rangerpolicy.py -h %s -a %s/Ranger/policy/%d/%d.json", rootPath.c_str(), rangerHost.c_str(), rootPath.c_str(), i, j);
+ Command::getCommandStatus(cmd);
+ }
+ }
+ sleep(60);
+
+
+ for (int i = 1; i <= sql_num; i++) {
+ //run sql by different users
+ string normal_sqlfile = hawq::test::stringFormat("Ranger/sql/normal/%d.sql", i);
+ string super_sqlfile = hawq::test::stringFormat("Ranger/sql/super/%d.sql", i);
+ string normal_ansfile_success = hawq::test::stringFormat("Ranger/ans/normal%d_success.ans", i);
+ string super_ansfile_success = hawq::test::stringFormat("Ranger/ans/super%d_success.ans", i);
+
+
+ cmd = hawq::test::stringFormat("ls -l %s/Ranger/policy/%d/ 2>/dev/null| wc -l", rootPath.c_str(), i);
+ int policy_num = std::atoi(Command::getCommandOutput(cmd).c_str());
+ cmd = hawq::test::stringFormat("ls -l %s/Ranger/sql/super/%d.sql 2>/dev/null | wc -l", rootPath.c_str(), i);
+ int supersqlexist = std::atoi(Command::getCommandOutput(cmd).c_str());
+ util.execSQLFile(normal_sqlfile, normal_ansfile_success, initfile, true, true);
+ if (supersqlexist) {
+ util.execSQLFile(super_sqlfile, super_ansfile_success, initfile, true, true);
+ }
+ }
+
+ //using gpadmin to clear database environment.
+ for (int i = 1; i <= sql_num; i++) {
+ string admin_sqlfile = hawq::test::stringFormat("Ranger/sql/admin/%d.sql", i);
+ string admin_ansfile = hawq::test::stringFormat("Ranger/ans/adminsecond%d.ans", i);
+ util.execSQLFile(admin_sqlfile, admin_ansfile, initfile, true, true);
+ }
+
+ for (int i = 1; i <= sql_num; i++) {
+ // delete user_num
+ std::string normalusername = hawq::test::stringFormat("usertest%d", i);
+ std::string superusername = hawq::test::stringFormat("usersuper%d", i);
+ util.execute(hawq::test::stringFormat("drop role %s;",normalusername.c_str()), false);
+ util.execute(hawq::test::stringFormat("drop role %s;",superusername.c_str()), false);
+ // delete policy
+ std::string cmd = hawq::test::stringFormat("ls -l %s/Ranger/policy/%d/ 2>/dev/null | wc -l", rootPath.c_str(), i);
+ int policy_num = std::atoi(Command::getCommandOutput(cmd).c_str());
+ for (int j = 1; j <= policy_num; j++) {
+ cmd = hawq::test::stringFormat("python %s/Ranger/rangerpolicy.py -h %s -d policy%d-%d", rootPath.c_str(), rangerHost.c_str(), i, j);
+ Command::getCommandStatus(cmd);
+ }
+ }
+
+ gpdfist.finalize_gpfdist();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/test_ranger.h
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/test_ranger.h b/src/test/feature/Ranger/test_ranger.h
new file mode 100644
index 0000000..a12a71a
--- /dev/null
+++ b/src/test/feature/Ranger/test_ranger.h
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef TEST_HAWQ_RANGER_H
+#define TEST_HAWQ_RANGER_H
+
+#include "gtest/gtest.h"
+
+class TestHawqRanger : public ::testing::Test {
+public:
+ TestHawqRanger() {
+ }
+ ~TestHawqRanger() {
+ }
+};
+
+#endif
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/lib/gpfdist.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/gpfdist.cpp b/src/test/feature/lib/gpfdist.cpp
index fbd4cf1..b3f24aa 100644
--- a/src/test/feature/lib/gpfdist.cpp
+++ b/src/test/feature/lib/gpfdist.cpp
@@ -52,13 +52,6 @@ void GPfdist::init_gpfdist() {
}
void GPfdist::finalize_gpfdist() {
- util->execute("drop external table EXT_NATION_WITH_EXIST_ERROR_TABLE;");
- util->execute("drop external table EXT_NATION1;");
- util->execute("drop table EXT_NATION_ERROR1 CASCADE;");
- util->execute("drop external table EXT_NATION2;");
- util->execute("drop table EXT_NATION_ERROR2 CASCADE;");
- util->execute("drop external table EXT_NATION3;");
- util->execute("drop table EXT_NATION_ERROR3 CASCADE;");
util->execute("select * from gpfdist_stop;");
util->execute("select * from gpfdist_status;");
util->execute("drop external table gpfdist_status;");
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/lib/psql.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/lib/psql.cpp b/src/test/feature/lib/psql.cpp
index b448198..0e71d56 100644
--- a/src/test/feature/lib/psql.cpp
+++ b/src/test/feature/lib/psql.cpp
@@ -106,9 +106,9 @@ PSQL& PSQL::runSQLCommand(const string& sql_cmd) {
return *this;
}
-PSQL& PSQL::runSQLFile(const string& sql_file) {
+PSQL& PSQL::runSQLFile(const string& sql_file, bool printTupleOnly) {
this->_last_status =
- hawq::test::Command::getCommandStatus(this->_getPSQLFileCommand(sql_file));
+ hawq::test::Command::getCommandStatus(this->_getPSQLFileCommand(sql_file, printTupleOnly));
return *this;
}
@@ -210,9 +210,14 @@ const string PSQL::_getPSQLQueryCommand(const string& query) const {
return command.append(" -c \"").append(query).append("\"");
}
-const string PSQL::_getPSQLFileCommand(const string& file) const {
+const string PSQL::_getPSQLFileCommand(const string& file, bool printTupleOnly) const {
string command = this->_getPSQLBaseCommand();
- return command.append(" -a -f ").append(file);
+ if (printTupleOnly) {
+ return command.append(" -a -A -t -f").append(file);
+ }
+ else {
+ return command.append(" -a -f ").append(file);
+ }
}
bool PSQL::checkDiff(const string& expect_file,
[4/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Posted by hu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal56_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal56_fail.ans b/src/test/feature/Ranger/ans/normal56_fail.ans
new file mode 100644
index 0000000..e77c1f0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal56_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest56;
+SET
+drop type mytype cascade;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: type "mytype" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal56_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal56_success.ans b/src/test/feature/Ranger/ans/normal56_success.ans
new file mode 100644
index 0000000..a31a5e7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal56_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest56;
+SET
+drop type mytype cascade;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of type mytype
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal57_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal57_fail.ans b/src/test/feature/Ranger/ans/normal57_fail.ans
new file mode 100644
index 0000000..1235d1c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal57_fail.ans
@@ -0,0 +1,14 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest57;
+SET
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+BEGIN
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: DECLARE mycursor CURSOR FOR SELECT * FROM a order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+LINE 1: DECLARE mycursor CURSOR FOR SELECT * FROM a order by i;
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: current transaction is aborted, commands ignored until end of transaction block
+ROLLBACK
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal57_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal57_success.ans b/src/test/feature/Ranger/ans/normal57_success.ans
new file mode 100644
index 0000000..a76f2fa
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal57_success.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest57;
+SET
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+BEGIN
+DECLARE CURSOR
+1
+1
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal58_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal58_fail.ans b/src/test/feature/Ranger/ans/normal58_fail.ans
new file mode 100644
index 0000000..bf8ab04
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal58_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest58;
+SET
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+BEGIN
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: current transaction is aborted, commands ignored until end of transaction block
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: current transaction is aborted, commands ignored until end of transaction block
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: current transaction is aborted, commands ignored until end of transaction block
+ROLLBACK
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal58_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal58_success.ans b/src/test/feature/Ranger/ans/normal58_success.ans
new file mode 100644
index 0000000..bbbdd83
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal58_success.ans
@@ -0,0 +1,11 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest58;
+SET
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+BEGIN
+INSERT 0 1
+SAVEPOINT
+INSERT 0 1
+RELEASE
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal59_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal59_fail.ans b/src/test/feature/Ranger/ans/normal59_fail.ans
new file mode 100644
index 0000000..af4df98
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal59_fail.ans
@@ -0,0 +1,12 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest59;
+SET
+\d
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 1: select version()
+ ^
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+LINE 7: LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnam...
+ ^
+No relations found.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal59_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal59_success.ans b/src/test/feature/Ranger/ans/normal59_success.ans
new file mode 100644
index 0000000..2cffdee
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal59_success.ans
@@ -0,0 +1,13 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest59;
+SET
+\d
+public|a|table|usertest1|append only
+public|aa|table|usertest35|append only
+public|aaa|table|usertest45|append only
+public|av|view|usertest34|none
+public|ext_t|table|usertest26|external
+public|ext_t2|table|usertest28|external
+public|foo|table|usertest20|append only
+public|myseq|sequence|usertest37|heap
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal5_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal5_success.ans b/src/test/feature/Ranger/ans/normal5_success.ans
new file mode 100644
index 0000000..658110a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal5_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest5;
+SET
+drop function f4();
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: function f4() does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal60_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal60_fail.ans b/src/test/feature/Ranger/ans/normal60_fail.ans
new file mode 100644
index 0000000..63493dc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal60_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest60;
+SET
+analyze a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal60_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal60_success.ans b/src/test/feature/Ranger/ans/normal60_success.ans
new file mode 100644
index 0000000..d5ece26
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal60_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest60;
+SET
+analyze a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: Skipping "a" --- only table or database owner can analyze it
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal61_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal61_fail.ans b/src/test/feature/Ranger/ans/normal61_fail.ans
new file mode 100644
index 0000000..9e3463e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal61_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest61;
+SET
+analyze;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal61_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal61_success.ans b/src/test/feature/Ranger/ans/normal61_success.ans
new file mode 100644
index 0000000..9e3463e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal61_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest61;
+SET
+analyze;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal62_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal62_fail.ans b/src/test/feature/Ranger/ans/normal62_fail.ans
new file mode 100644
index 0000000..43fc7aa
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal62_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest62;
+SET
+vacuum aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "aa" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal62_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal62_success.ans b/src/test/feature/Ranger/ans/normal62_success.ans
new file mode 100644
index 0000000..595b0db
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal62_success.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest62;
+SET
+vacuum aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aa" --- only table or database owner can vacuum it
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal63_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal63_success.ans b/src/test/feature/Ranger/ans/normal63_success.ans
new file mode 100644
index 0000000..e4c73b9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal63_success.ans
@@ -0,0 +1,92 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest63;
+SET
+vacuum analyze;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_packages" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_parts" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_sizing" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_sizing_profiles" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_appendonly" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_appendonly_alter_column" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_master_mirroring" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_extprotocol" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_partition" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_partition_rule" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_filespace" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_filespace_entry" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_global_sequence" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_persistent_relfile_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_relfile_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_persistent_relation_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_persistent_database_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_persistent_tablespace_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_persistent_filespace_node" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_attribute_encoding" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_compression" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_filesystem" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_foreign_data_wrapper" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_foreign_server" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_foreign_table" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_partition_encoding" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_proc_callback" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_type_encoding" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_database" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_auth_members" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_auth_time_constraint" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_authid" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_statistic" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_features" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_implementation_info" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "sql_languages" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_user_mapping" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_remote_credentials" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_type" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_attribute" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_proc" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_class" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_autovacuum" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_attrdef" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_constraint" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_inherits" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_index" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_operator" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_opclass" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_am" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_amop" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_amproc" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_language" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_largeobject" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_aggregate" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_stat_last_operation" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_stat_last_shoperation" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_rewrite" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_trigger" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_listener" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_description" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_cast" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_namespace" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_conversion" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_depend" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_tablespace" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_pltemplate" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_shdepend" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_shdescription" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_resqueue" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_configuration" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_configuration_history" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_db_interfaces" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_interfaces" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_distribution_policy" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_version_at_initdb" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_segment_configuration" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_san_configuration" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "gp_verification_history" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_window" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "pg_exttable" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "a" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "foo" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aa" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "t" --- only table or database owner can vacuum it
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aaa" --- only table or database owner can vacuum it
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal64_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal64_fail.ans b/src/test/feature/Ranger/ans/normal64_fail.ans
new file mode 100644
index 0000000..49efa7a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal64_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest64;
+SET
+truncate aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "aa" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal64_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal64_success.ans b/src/test/feature/Ranger/ans/normal64_success.ans
new file mode 100644
index 0000000..f72c05c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal64_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest64;
+SET
+truncate aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation aa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal65_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal65_fail.ans b/src/test/feature/Ranger/ans/normal65_fail.ans
new file mode 100644
index 0000000..aefa01e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal65_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest65;
+SET
+alter table a rename column i to j;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: relation "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal65_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal65_success.ans b/src/test/feature/Ranger/ans/normal65_success.ans
new file mode 100644
index 0000000..795497e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal65_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest65;
+SET
+alter table a rename column i to j;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation a
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal66_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal66_fail.ans b/src/test/feature/Ranger/ans/normal66_fail.ans
new file mode 100644
index 0000000..597bbc7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal66_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest66;
+SET
+drop SEQUENCE myseq;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: sequence "myseq" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal66_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal66_success.ans b/src/test/feature/Ranger/ans/normal66_success.ans
new file mode 100644
index 0000000..35b4322
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal66_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest66;
+SET
+drop SEQUENCE myseq;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation myseq
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal67_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal67_fail.ans b/src/test/feature/Ranger/ans/normal67_fail.ans
new file mode 100644
index 0000000..0d8b941
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal67_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest67;
+SET
+drop view av;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: view "av" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal67_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal67_success.ans b/src/test/feature/Ranger/ans/normal67_success.ans
new file mode 100644
index 0000000..9ac8fbc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal67_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest67;
+SET
+drop view av;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation av
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal68_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal68_fail.ans b/src/test/feature/Ranger/ans/normal68_fail.ans
new file mode 100644
index 0000000..193b108
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal68_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest68;
+SET
+drop table aaa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "aaa" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal68_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal68_success.ans b/src/test/feature/Ranger/ans/normal68_success.ans
new file mode 100644
index 0000000..e72e946
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal68_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest68;
+SET
+drop table aaa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation aaa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal69_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal69_fail.ans b/src/test/feature/Ranger/ans/normal69_fail.ans
new file mode 100644
index 0000000..0758da4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal69_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest69;
+SET
+drop table aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "aa" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal69_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal69_success.ans b/src/test/feature/Ranger/ans/normal69_success.ans
new file mode 100644
index 0000000..0d230ff
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal69_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest69;
+SET
+drop table aa;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation aa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal6_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal6_success.ans b/src/test/feature/Ranger/ans/normal6_success.ans
new file mode 100644
index 0000000..842aa47
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal6_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest6;
+SET
+drop language plpythonu;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be superuser to drop procedural language
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal70_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal70_fail.ans b/src/test/feature/Ranger/ans/normal70_fail.ans
new file mode 100644
index 0000000..35c8300
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal70_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest70;
+SET
+drop table a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: table "a" does not exist
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal70_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal70_success.ans b/src/test/feature/Ranger/ans/normal70_success.ans
new file mode 100644
index 0000000..b6e2266
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal70_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest70;
+SET
+drop table a;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of relation a
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal71_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal71_fail.ans b/src/test/feature/Ranger/ans/normal71_fail.ans
new file mode 100644
index 0000000..d329681
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal71_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest71;
+SET
+drop schema sa CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of schema sa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal71_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal71_success.ans b/src/test/feature/Ranger/ans/normal71_success.ans
new file mode 100644
index 0000000..d329681
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal71_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest71;
+SET
+drop schema sa CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: must be owner of schema sa
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal7_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal7_fail.ans b/src/test/feature/Ranger/ans/normal7_fail.ans
new file mode 100644
index 0000000..0911afd
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal7_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest7;
+SET
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal7_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal7_success.ans b/src/test/feature/Ranger/ans/normal7_success.ans
new file mode 100644
index 0000000..b0b00da
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal7_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest7;
+SET
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal8_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal8_fail.ans b/src/test/feature/Ranger/ans/normal8_fail.ans
new file mode 100644
index 0000000..14525fa
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal8_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest8;
+SET
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal8_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal8_success.ans b/src/test/feature/Ranger/ans/normal8_success.ans
new file mode 100644
index 0000000..edc8c5c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal8_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest8;
+SET
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal9_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal9_fail.ans b/src/test/feature/Ranger/ans/normal9_fail.ans
new file mode 100644
index 0000000..be7add4
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal9_fail.ans
@@ -0,0 +1,7 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest9;
+SET
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: usage privilege of namespace public is required.
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: no schema has been selected to create in
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/normal9_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/normal9_success.ans b/src/test/feature/Ranger/ans/normal9_success.ans
new file mode 100644
index 0000000..c597a77
--- /dev/null
+++ b/src/test/feature/Ranger/ans/normal9_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usertest9;
+SET
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+CREATE OPERATOR
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super11_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super11_fail.ans b/src/test/feature/Ranger/ans/super11_fail.ans
new file mode 100644
index 0000000..85f9b88
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super11_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper11;
+SET
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for schema public
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super11_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super11_success.ans b/src/test/feature/Ranger/ans/super11_success.ans
new file mode 100644
index 0000000..81ebd57
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super11_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper11;
+SET
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+CREATE OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super12_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super12_success.ans b/src/test/feature/Ranger/ans/super12_success.ans
new file mode 100644
index 0000000..6467f16
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super12_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper12;
+SET
+drop OPERATOR CLASS sva_special_ops USING btree;
+DROP OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super17_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super17_success.ans b/src/test/feature/Ranger/ans/super17_success.ans
new file mode 100644
index 0000000..c4a771f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super17_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper17;
+SET
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+CREATE QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super18_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super18_success.ans b/src/test/feature/Ranger/ans/super18_success.ans
new file mode 100644
index 0000000..40ed900
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super18_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper18;
+SET
+DROP RESOURCE QUEUE myqueue;
+DROP QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super19_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super19_success.ans b/src/test/feature/Ranger/ans/super19_success.ans
new file mode 100644
index 0000000..59c0d02
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super19_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper19;
+SET
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+CREATE TABLESPACE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super23_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super23_success.ans b/src/test/feature/Ranger/ans/super23_success.ans
new file mode 100644
index 0000000..e3737c0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super23_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper23;
+SET
+drop tablespace mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: tablespace "mytblspace" is not empty: existing table.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super24_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super24_fail.ans b/src/test/feature/Ranger/ans/super24_fail.ans
new file mode 100644
index 0000000..dc20846
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super24_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper24;
+SET
+COPY a FROM '/tmp/a.txt';
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for relation a
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super24_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super24_success.ans b/src/test/feature/Ranger/ans/super24_success.ans
new file mode 100644
index 0000000..1f63577
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super24_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper24;
+SET
+COPY a FROM '/tmp/a.txt';
+COPY 2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super2_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super2_fail.ans b/src/test/feature/Ranger/ans/super2_fail.ans
new file mode 100644
index 0000000..1b76d7d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super2_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper2;
+SET
+create language plpythonu;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for language c
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super2_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super2_success.ans b/src/test/feature/Ranger/ans/super2_success.ans
new file mode 100644
index 0000000..8668f8e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super2_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper2;
+SET
+create language plpythonu;
+CREATE LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super3_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super3_fail.ans b/src/test/feature/Ranger/ans/super3_fail.ans
new file mode 100644
index 0000000..6dfb35e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super3_fail.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper3;
+SET
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: ERROR: permission denied for schema public
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super3_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super3_success.ans b/src/test/feature/Ranger/ans/super3_success.ans
new file mode 100644
index 0000000..4a37b16
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super3_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper3;
+SET
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super5_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super5_success.ans b/src/test/feature/Ranger/ans/super5_success.ans
new file mode 100644
index 0000000..d2bff25
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super5_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper5;
+SET
+drop function f4();
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super63_fail.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super63_fail.ans b/src/test/feature/Ranger/ans/super63_fail.ans
new file mode 100644
index 0000000..07b2259
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super63_fail.ans
@@ -0,0 +1,10 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper63;
+SET
+vacuum analyze;
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "a" --- error returned: permission denied for relation(s): a
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aa" --- error returned: permission denied for relation(s): aa
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: WARNING: skipping "aaa" --- error returned: permission denied for relation(s): aaa
+psql:/tmp/TestHawqRanger_BasicTest.sql:4: INFO: ANALYZE completed. Success: 85, Failure: 3 (a, aa, aaa)
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super63_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super63_success.ans b/src/test/feature/Ranger/ans/super63_success.ans
new file mode 100644
index 0000000..0b43010
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super63_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper63;
+SET
+vacuum analyze;
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/super6_success.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/super6_success.ans b/src/test/feature/Ranger/ans/super6_success.ans
new file mode 100644
index 0000000..b168dda
--- /dev/null
+++ b/src/test/feature/Ranger/ans/super6_success.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+set session role=usersuper6;
+SET
+drop language plpythonu;
+DROP LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/data/copydata.txt
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/data/copydata.txt b/src/test/feature/Ranger/data/copydata.txt
new file mode 100644
index 0000000..6ed281c
--- /dev/null
+++ b/src/test/feature/Ranger/data/copydata.txt
@@ -0,0 +1,2 @@
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/1/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/1/1.json b/src/test/feature/Ranger/policy/1/1.json
new file mode 100644
index 0000000..dccf789
--- /dev/null
+++ b/src/test/feature/Ranger/policy/1/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy1-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest1", "usersuper1"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/10/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/10/1.json b/src/test/feature/Ranger/policy/10/1.json
new file mode 100644
index 0000000..fbd564e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/10/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy10-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest10", "usersuper10"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["si_same"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/10/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/10/2.json b/src/test/feature/Ranger/policy/10/2.json
new file mode 100644
index 0000000..b5940c9
--- /dev/null
+++ b/src/test/feature/Ranger/policy/10/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy10-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest10", "usersuper10"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/10/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/10/3.json b/src/test/feature/Ranger/policy/10/3.json
new file mode 100644
index 0000000..14490da
--- /dev/null
+++ b/src/test/feature/Ranger/policy/10/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy10-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest10", "usersuper10"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["plpgsql"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/11/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/11/1.json b/src/test/feature/Ranger/policy/11/1.json
new file mode 100644
index 0000000..6b7117b
--- /dev/null
+++ b/src/test/feature/Ranger/policy/11/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy11-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest11", "usersuper11"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/13/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/13/1.json b/src/test/feature/Ranger/policy/13/1.json
new file mode 100644
index 0000000..245b4cc
--- /dev/null
+++ b/src/test/feature/Ranger/policy/13/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy13-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest13", "usersuper13"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/14/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/14/1.json b/src/test/feature/Ranger/policy/14/1.json
new file mode 100644
index 0000000..c81cb81
--- /dev/null
+++ b/src/test/feature/Ranger/policy/14/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy14-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest14", "usersuper14"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/15/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/15/1.json b/src/test/feature/Ranger/policy/15/1.json
new file mode 100644
index 0000000..2842a55
--- /dev/null
+++ b/src/test/feature/Ranger/policy/15/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy15-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest15", "usersuper15"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/16/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/16/1.json b/src/test/feature/Ranger/policy/16/1.json
new file mode 100644
index 0000000..025262e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/16/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy16-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest16", "usersuper16"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/2/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/2/1.json b/src/test/feature/Ranger/policy/2/1.json
new file mode 100644
index 0000000..f5170f3
--- /dev/null
+++ b/src/test/feature/Ranger/policy/2/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy2-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest2", "usersuper2"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["c"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/20/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/20/1.json b/src/test/feature/Ranger/policy/20/1.json
new file mode 100644
index 0000000..e457b50
--- /dev/null
+++ b/src/test/feature/Ranger/policy/20/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy20-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest20", "usersuper20"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/20/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/20/2.json b/src/test/feature/Ranger/policy/20/2.json
new file mode 100644
index 0000000..0fc35e5
--- /dev/null
+++ b/src/test/feature/Ranger/policy/20/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy20-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest20", "usersuper20"]}], "resources": {"tablespace": {"isExcludes": false, "isRecursive": false, "values": ["mytblspace"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/21/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/21/1.json b/src/test/feature/Ranger/policy/21/1.json
new file mode 100644
index 0000000..49c0c89
--- /dev/null
+++ b/src/test/feature/Ranger/policy/21/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy21-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest21", "usersuper21"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/21/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/21/2.json b/src/test/feature/Ranger/policy/21/2.json
new file mode 100644
index 0000000..d5c4993
--- /dev/null
+++ b/src/test/feature/Ranger/policy/21/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy21-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}, {"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest21", "usersuper21"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["foo"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/22/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/22/1.json b/src/test/feature/Ranger/policy/22/1.json
new file mode 100644
index 0000000..1a24f96
--- /dev/null
+++ b/src/test/feature/Ranger/policy/22/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy22-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest22", "usersuper22"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/24/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/24/1.json b/src/test/feature/Ranger/policy/24/1.json
new file mode 100644
index 0000000..450778a
--- /dev/null
+++ b/src/test/feature/Ranger/policy/24/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy24-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}, {"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest24", "usersuper24"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/25/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/25/1.json b/src/test/feature/Ranger/policy/25/1.json
new file mode 100644
index 0000000..3aa805c
--- /dev/null
+++ b/src/test/feature/Ranger/policy/25/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy25-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest25", "usersuper25"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/25/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/25/2.json b/src/test/feature/Ranger/policy/25/2.json
new file mode 100644
index 0000000..16411bc
--- /dev/null
+++ b/src/test/feature/Ranger/policy/25/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy25-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest25", "usersuper25"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/26/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/26/1.json b/src/test/feature/Ranger/policy/26/1.json
new file mode 100644
index 0000000..8904593
--- /dev/null
+++ b/src/test/feature/Ranger/policy/26/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy26-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest26", "usersuper26"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/27/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/27/1.json b/src/test/feature/Ranger/policy/27/1.json
new file mode 100644
index 0000000..b2e9858
--- /dev/null
+++ b/src/test/feature/Ranger/policy/27/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy27-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest27", "usersuper27"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/27/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/27/2.json b/src/test/feature/Ranger/policy/27/2.json
new file mode 100644
index 0000000..85e2ccd
--- /dev/null
+++ b/src/test/feature/Ranger/policy/27/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy27-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest27", "usersuper27"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["ext_t"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/28/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/28/1.json b/src/test/feature/Ranger/policy/28/1.json
new file mode 100644
index 0000000..2bddfcd
--- /dev/null
+++ b/src/test/feature/Ranger/policy/28/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy28-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest28", "usersuper28"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/28/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/28/2.json b/src/test/feature/Ranger/policy/28/2.json
new file mode 100644
index 0000000..49bd614
--- /dev/null
+++ b/src/test/feature/Ranger/policy/28/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy28-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest28", "usersuper28"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["ext_t"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/29/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/29/1.json b/src/test/feature/Ranger/policy/29/1.json
new file mode 100644
index 0000000..311aa16
--- /dev/null
+++ b/src/test/feature/Ranger/policy/29/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy29-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest29", "usersuper29"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/29/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/29/2.json b/src/test/feature/Ranger/policy/29/2.json
new file mode 100644
index 0000000..4d4f632
--- /dev/null
+++ b/src/test/feature/Ranger/policy/29/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy29-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest29", "usersuper29"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["ext_t2"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/3/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/3/1.json b/src/test/feature/Ranger/policy/3/1.json
new file mode 100644
index 0000000..60c0fd6
--- /dev/null
+++ b/src/test/feature/Ranger/policy/3/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy3-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest3", "usersuper3"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/30/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/30/1.json b/src/test/feature/Ranger/policy/30/1.json
new file mode 100644
index 0000000..362d498
--- /dev/null
+++ b/src/test/feature/Ranger/policy/30/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy30-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest30", "usersuper30"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/31/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/31/1.json b/src/test/feature/Ranger/policy/31/1.json
new file mode 100644
index 0000000..4537aa6
--- /dev/null
+++ b/src/test/feature/Ranger/policy/31/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy31-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest31", "usersuper31"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/32/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/32/1.json b/src/test/feature/Ranger/policy/32/1.json
new file mode 100644
index 0000000..b96694c
--- /dev/null
+++ b/src/test/feature/Ranger/policy/32/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy32-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "create-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest32", "usersuper32"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["*"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/33/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/33/1.json b/src/test/feature/Ranger/policy/33/1.json
new file mode 100644
index 0000000..8a6ecb9
--- /dev/null
+++ b/src/test/feature/Ranger/policy/33/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy33-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "temp"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest33", "usersuper33"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["*"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/33/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/33/2.json b/src/test/feature/Ranger/policy/33/2.json
new file mode 100644
index 0000000..492e974
--- /dev/null
+++ b/src/test/feature/Ranger/policy/33/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy33-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest33", "usersuper33"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["pg_temp_14"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/34/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/34/1.json b/src/test/feature/Ranger/policy/34/1.json
new file mode 100644
index 0000000..6cc0e4f
--- /dev/null
+++ b/src/test/feature/Ranger/policy/34/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy34-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest34", "usersuper34"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/35/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/35/1.json b/src/test/feature/Ranger/policy/35/1.json
new file mode 100644
index 0000000..d49b931
--- /dev/null
+++ b/src/test/feature/Ranger/policy/35/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy35-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest35", "usersuper35"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/35/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/35/2.json b/src/test/feature/Ranger/policy/35/2.json
new file mode 100644
index 0000000..70c04ba
--- /dev/null
+++ b/src/test/feature/Ranger/policy/35/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy35-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest35", "usersuper35"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/36/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/36/1.json b/src/test/feature/Ranger/policy/36/1.json
new file mode 100644
index 0000000..b393e95
--- /dev/null
+++ b/src/test/feature/Ranger/policy/36/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy36-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest36", "usersuper36"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["sa"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/37/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/37/1.json b/src/test/feature/Ranger/policy/37/1.json
new file mode 100644
index 0000000..1569661
--- /dev/null
+++ b/src/test/feature/Ranger/policy/37/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy37-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest37", "usersuper37"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/38/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/38/1.json b/src/test/feature/Ranger/policy/38/1.json
new file mode 100644
index 0000000..fa191be
--- /dev/null
+++ b/src/test/feature/Ranger/policy/38/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy38-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest38", "usersuper38"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/38/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/38/2.json b/src/test/feature/Ranger/policy/38/2.json
new file mode 100644
index 0000000..1bd36ca
--- /dev/null
+++ b/src/test/feature/Ranger/policy/38/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy38-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}, {"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest38", "usersuper38"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/39/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/39/1.json b/src/test/feature/Ranger/policy/39/1.json
new file mode 100644
index 0000000..ab9a7e0
--- /dev/null
+++ b/src/test/feature/Ranger/policy/39/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy39-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest39", "usersuper39"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
[6/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Posted by hu...@apache.org.
HAWQ-1359. Add policy test for HAWQ with Ranger enabled.
Signed-off-by: Chuling Wang <wa...@126.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/12089267
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/12089267
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/12089267
Branch: refs/heads/master
Commit: 1208926791cc3b30cc64e243e57edf86a9794af1
Parents: ee79ec2
Author: Hubert Zhang <hu...@apache.org>
Authored: Thu Mar 2 09:53:39 2017 +0800
Committer: Chuling Wang <wa...@126.com>
Committed: Thu Mar 2 09:53:39 2017 +0800
----------------------------------------------------------------------
.../feature/ExternalSource/test_errortbl.cpp | 8 +
src/test/feature/Ranger/ans/adminfirst1.ans | 4 +
src/test/feature/Ranger/ans/adminfirst10.ans | 4 +
src/test/feature/Ranger/ans/adminfirst11.ans | 4 +
src/test/feature/Ranger/ans/adminfirst12.ans | 4 +
src/test/feature/Ranger/ans/adminfirst13.ans | 4 +
src/test/feature/Ranger/ans/adminfirst14.ans | 4 +
src/test/feature/Ranger/ans/adminfirst15.ans | 4 +
src/test/feature/Ranger/ans/adminfirst16.ans | 4 +
src/test/feature/Ranger/ans/adminfirst17.ans | 4 +
src/test/feature/Ranger/ans/adminfirst18.ans | 4 +
src/test/feature/Ranger/ans/adminfirst19.ans | 4 +
src/test/feature/Ranger/ans/adminfirst2.ans | 4 +
src/test/feature/Ranger/ans/adminfirst20.ans | 4 +
src/test/feature/Ranger/ans/adminfirst21.ans | 4 +
src/test/feature/Ranger/ans/adminfirst22.ans | 4 +
src/test/feature/Ranger/ans/adminfirst23.ans | 4 +
src/test/feature/Ranger/ans/adminfirst24.ans | 4 +
src/test/feature/Ranger/ans/adminfirst25.ans | 5 +
src/test/feature/Ranger/ans/adminfirst26.ans | 4 +
src/test/feature/Ranger/ans/adminfirst27.ans | 29 ++++
src/test/feature/Ranger/ans/adminfirst28.ans | 4 +
src/test/feature/Ranger/ans/adminfirst29.ans | 4 +
src/test/feature/Ranger/ans/adminfirst3.ans | 4 +
src/test/feature/Ranger/ans/adminfirst30.ans | 4 +
src/test/feature/Ranger/ans/adminfirst31.ans | 4 +
src/test/feature/Ranger/ans/adminfirst32.ans | 4 +
src/test/feature/Ranger/ans/adminfirst33.ans | 4 +
src/test/feature/Ranger/ans/adminfirst34.ans | 4 +
src/test/feature/Ranger/ans/adminfirst35.ans | 4 +
src/test/feature/Ranger/ans/adminfirst36.ans | 4 +
src/test/feature/Ranger/ans/adminfirst37.ans | 4 +
src/test/feature/Ranger/ans/adminfirst38.ans | 4 +
src/test/feature/Ranger/ans/adminfirst39.ans | 4 +
src/test/feature/Ranger/ans/adminfirst4.ans | 4 +
src/test/feature/Ranger/ans/adminfirst40.ans | 4 +
src/test/feature/Ranger/ans/adminfirst41.ans | 8 +
src/test/feature/Ranger/ans/adminfirst42.ans | 6 +
src/test/feature/Ranger/ans/adminfirst43.ans | 8 +
src/test/feature/Ranger/ans/adminfirst44.ans | 4 +
src/test/feature/Ranger/ans/adminfirst45.ans | 4 +
src/test/feature/Ranger/ans/adminfirst46.ans | 6 +
src/test/feature/Ranger/ans/adminfirst47.ans | 5 +
src/test/feature/Ranger/ans/adminfirst48.ans | 4 +
src/test/feature/Ranger/ans/adminfirst49.ans | 4 +
src/test/feature/Ranger/ans/adminfirst5.ans | 4 +
src/test/feature/Ranger/ans/adminfirst50.ans | 4 +
src/test/feature/Ranger/ans/adminfirst51.ans | 4 +
src/test/feature/Ranger/ans/adminfirst52.ans | 4 +
src/test/feature/Ranger/ans/adminfirst53.ans | 4 +
src/test/feature/Ranger/ans/adminfirst54.ans | 4 +
src/test/feature/Ranger/ans/adminfirst55.ans | 9 ++
src/test/feature/Ranger/ans/adminfirst56.ans | 5 +
src/test/feature/Ranger/ans/adminfirst57.ans | 8 +
src/test/feature/Ranger/ans/adminfirst58.ans | 9 ++
src/test/feature/Ranger/ans/adminfirst59.ans | 8 +
src/test/feature/Ranger/ans/adminfirst6.ans | 4 +
src/test/feature/Ranger/ans/adminfirst60.ans | 4 +
src/test/feature/Ranger/ans/adminfirst61.ans | 4 +
src/test/feature/Ranger/ans/adminfirst62.ans | 4 +
src/test/feature/Ranger/ans/adminfirst63.ans | 4 +
src/test/feature/Ranger/ans/adminfirst64.ans | 4 +
src/test/feature/Ranger/ans/adminfirst65.ans | 4 +
src/test/feature/Ranger/ans/adminfirst66.ans | 4 +
src/test/feature/Ranger/ans/adminfirst67.ans | 4 +
src/test/feature/Ranger/ans/adminfirst68.ans | 4 +
src/test/feature/Ranger/ans/adminfirst69.ans | 4 +
src/test/feature/Ranger/ans/adminfirst7.ans | 4 +
src/test/feature/Ranger/ans/adminfirst70.ans | 4 +
src/test/feature/Ranger/ans/adminfirst71.ans | 5 +
src/test/feature/Ranger/ans/adminfirst8.ans | 4 +
src/test/feature/Ranger/ans/adminfirst9.ans | 4 +
src/test/feature/Ranger/ans/adminsecond1.ans | 4 +
src/test/feature/Ranger/ans/adminsecond10.ans | 4 +
src/test/feature/Ranger/ans/adminsecond11.ans | 4 +
src/test/feature/Ranger/ans/adminsecond12.ans | 4 +
src/test/feature/Ranger/ans/adminsecond13.ans | 4 +
src/test/feature/Ranger/ans/adminsecond14.ans | 4 +
src/test/feature/Ranger/ans/adminsecond15.ans | 4 +
src/test/feature/Ranger/ans/adminsecond16.ans | 4 +
src/test/feature/Ranger/ans/adminsecond17.ans | 4 +
src/test/feature/Ranger/ans/adminsecond18.ans | 4 +
src/test/feature/Ranger/ans/adminsecond19.ans | 4 +
src/test/feature/Ranger/ans/adminsecond2.ans | 4 +
src/test/feature/Ranger/ans/adminsecond20.ans | 4 +
src/test/feature/Ranger/ans/adminsecond21.ans | 4 +
src/test/feature/Ranger/ans/adminsecond22.ans | 4 +
src/test/feature/Ranger/ans/adminsecond23.ans | 4 +
src/test/feature/Ranger/ans/adminsecond24.ans | 4 +
src/test/feature/Ranger/ans/adminsecond25.ans | 13 ++
src/test/feature/Ranger/ans/adminsecond26.ans | 4 +
src/test/feature/Ranger/ans/adminsecond27.ans | 29 ++++
src/test/feature/Ranger/ans/adminsecond28.ans | 4 +
src/test/feature/Ranger/ans/adminsecond29.ans | 4 +
src/test/feature/Ranger/ans/adminsecond3.ans | 4 +
src/test/feature/Ranger/ans/adminsecond30.ans | 4 +
src/test/feature/Ranger/ans/adminsecond31.ans | 4 +
src/test/feature/Ranger/ans/adminsecond32.ans | 4 +
src/test/feature/Ranger/ans/adminsecond33.ans | 4 +
src/test/feature/Ranger/ans/adminsecond34.ans | 4 +
src/test/feature/Ranger/ans/adminsecond35.ans | 4 +
src/test/feature/Ranger/ans/adminsecond36.ans | 4 +
src/test/feature/Ranger/ans/adminsecond37.ans | 4 +
src/test/feature/Ranger/ans/adminsecond38.ans | 4 +
src/test/feature/Ranger/ans/adminsecond39.ans | 4 +
src/test/feature/Ranger/ans/adminsecond4.ans | 4 +
src/test/feature/Ranger/ans/adminsecond40.ans | 4 +
src/test/feature/Ranger/ans/adminsecond41.ans | 16 ++
src/test/feature/Ranger/ans/adminsecond42.ans | 6 +
src/test/feature/Ranger/ans/adminsecond43.ans | 16 ++
src/test/feature/Ranger/ans/adminsecond44.ans | 4 +
src/test/feature/Ranger/ans/adminsecond45.ans | 4 +
src/test/feature/Ranger/ans/adminsecond46.ans | 6 +
src/test/feature/Ranger/ans/adminsecond47.ans | 5 +
src/test/feature/Ranger/ans/adminsecond48.ans | 4 +
src/test/feature/Ranger/ans/adminsecond49.ans | 4 +
src/test/feature/Ranger/ans/adminsecond5.ans | 4 +
src/test/feature/Ranger/ans/adminsecond50.ans | 4 +
src/test/feature/Ranger/ans/adminsecond51.ans | 4 +
src/test/feature/Ranger/ans/adminsecond52.ans | 4 +
src/test/feature/Ranger/ans/adminsecond53.ans | 4 +
src/test/feature/Ranger/ans/adminsecond54.ans | 4 +
src/test/feature/Ranger/ans/adminsecond55.ans | 17 ++
src/test/feature/Ranger/ans/adminsecond56.ans | 5 +
src/test/feature/Ranger/ans/adminsecond57.ans | 8 +
src/test/feature/Ranger/ans/adminsecond58.ans | 9 ++
src/test/feature/Ranger/ans/adminsecond59.ans | 8 +
src/test/feature/Ranger/ans/adminsecond6.ans | 4 +
src/test/feature/Ranger/ans/adminsecond60.ans | 4 +
src/test/feature/Ranger/ans/adminsecond61.ans | 4 +
src/test/feature/Ranger/ans/adminsecond62.ans | 4 +
src/test/feature/Ranger/ans/adminsecond63.ans | 4 +
src/test/feature/Ranger/ans/adminsecond64.ans | 4 +
src/test/feature/Ranger/ans/adminsecond65.ans | 4 +
src/test/feature/Ranger/ans/adminsecond66.ans | 4 +
src/test/feature/Ranger/ans/adminsecond67.ans | 4 +
src/test/feature/Ranger/ans/adminsecond68.ans | 4 +
src/test/feature/Ranger/ans/adminsecond69.ans | 4 +
src/test/feature/Ranger/ans/adminsecond7.ans | 4 +
src/test/feature/Ranger/ans/adminsecond70.ans | 4 +
src/test/feature/Ranger/ans/adminsecond71.ans | 5 +
src/test/feature/Ranger/ans/adminsecond8.ans | 4 +
src/test/feature/Ranger/ans/adminsecond9.ans | 4 +
src/test/feature/Ranger/ans/normal10_fail.ans | 7 +
.../feature/Ranger/ans/normal10_success.ans | 6 +
.../feature/Ranger/ans/normal11_success.ans | 6 +
.../feature/Ranger/ans/normal12_success.ans | 7 +
src/test/feature/Ranger/ans/normal13_fail.ans | 7 +
.../feature/Ranger/ans/normal13_success.ans | 6 +
src/test/feature/Ranger/ans/normal14_fail.ans | 7 +
.../feature/Ranger/ans/normal14_success.ans | 6 +
src/test/feature/Ranger/ans/normal15_fail.ans | 7 +
.../feature/Ranger/ans/normal15_success.ans | 6 +
src/test/feature/Ranger/ans/normal16_fail.ans | 7 +
.../feature/Ranger/ans/normal16_success.ans | 6 +
.../feature/Ranger/ans/normal17_success.ans | 6 +
.../feature/Ranger/ans/normal18_success.ans | 6 +
.../feature/Ranger/ans/normal19_success.ans | 7 +
src/test/feature/Ranger/ans/normal1_fail.ans | 7 +
src/test/feature/Ranger/ans/normal1_success.ans | 6 +
src/test/feature/Ranger/ans/normal20_fail.ans | 7 +
.../feature/Ranger/ans/normal20_success.ans | 6 +
src/test/feature/Ranger/ans/normal21_fail.ans | 7 +
.../feature/Ranger/ans/normal21_success.ans | 6 +
src/test/feature/Ranger/ans/normal22_fail.ans | 7 +
.../feature/Ranger/ans/normal22_success.ans | 6 +
.../feature/Ranger/ans/normal23_success.ans | 6 +
.../feature/Ranger/ans/normal24_success.ans | 7 +
src/test/feature/Ranger/ans/normal25_fail.ans | 7 +
.../feature/Ranger/ans/normal25_success.ans | 7 +
src/test/feature/Ranger/ans/normal26_fail.ans | 7 +
.../feature/Ranger/ans/normal26_success.ans | 6 +
src/test/feature/Ranger/ans/normal27_fail.ans | 11 ++
.../feature/Ranger/ans/normal27_success.ans | 31 ++++
src/test/feature/Ranger/ans/normal28_fail.ans | 7 +
.../feature/Ranger/ans/normal28_success.ans | 6 +
src/test/feature/Ranger/ans/normal29_fail.ans | 7 +
.../feature/Ranger/ans/normal29_success.ans | 6 +
src/test/feature/Ranger/ans/normal2_success.ans | 6 +
src/test/feature/Ranger/ans/normal30_fail.ans | 7 +
.../feature/Ranger/ans/normal30_success.ans | 6 +
src/test/feature/Ranger/ans/normal31_fail.ans | 7 +
.../feature/Ranger/ans/normal31_success.ans | 6 +
src/test/feature/Ranger/ans/normal32_fail.ans | 6 +
.../feature/Ranger/ans/normal32_success.ans | 6 +
src/test/feature/Ranger/ans/normal33_fail.ans | 6 +
.../feature/Ranger/ans/normal33_success.ans | 6 +
src/test/feature/Ranger/ans/normal34_fail.ans | 11 ++
.../feature/Ranger/ans/normal34_success.ans | 6 +
src/test/feature/Ranger/ans/normal35_fail.ans | 11 ++
.../feature/Ranger/ans/normal35_success.ans | 8 +
src/test/feature/Ranger/ans/normal36_fail.ans | 6 +
.../feature/Ranger/ans/normal36_success.ans | 6 +
src/test/feature/Ranger/ans/normal37_fail.ans | 7 +
.../feature/Ranger/ans/normal37_success.ans | 6 +
src/test/feature/Ranger/ans/normal38_fail.ans | 7 +
.../feature/Ranger/ans/normal38_success.ans | 6 +
src/test/feature/Ranger/ans/normal39_fail.ans | 7 +
.../feature/Ranger/ans/normal39_success.ans | 6 +
src/test/feature/Ranger/ans/normal3_success.ans | 6 +
src/test/feature/Ranger/ans/normal40_fail.ans | 7 +
.../feature/Ranger/ans/normal40_success.ans | 6 +
src/test/feature/Ranger/ans/normal41_fail.ans | 11 ++
.../feature/Ranger/ans/normal41_success.ans | 10 ++
src/test/feature/Ranger/ans/normal42_fail.ans | 11 ++
.../feature/Ranger/ans/normal42_success.ans | 8 +
src/test/feature/Ranger/ans/normal43_fail.ans | 11 ++
.../feature/Ranger/ans/normal43_success.ans | 10 ++
src/test/feature/Ranger/ans/normal44_fail.ans | 11 ++
.../feature/Ranger/ans/normal44_success.ans | 6 +
src/test/feature/Ranger/ans/normal45_fail.ans | 11 ++
.../feature/Ranger/ans/normal45_success.ans | 6 +
src/test/feature/Ranger/ans/normal46_fail.ans | 9 ++
.../feature/Ranger/ans/normal46_success.ans | 8 +
src/test/feature/Ranger/ans/normal47_fail.ans | 11 ++
.../feature/Ranger/ans/normal47_success.ans | 7 +
src/test/feature/Ranger/ans/normal48_fail.ans | 7 +
.../feature/Ranger/ans/normal48_success.ans | 6 +
src/test/feature/Ranger/ans/normal49_fail.ans | 7 +
.../feature/Ranger/ans/normal49_success.ans | 6 +
src/test/feature/Ranger/ans/normal4_fail.ans | 12 ++
src/test/feature/Ranger/ans/normal4_success.ans | 6 +
src/test/feature/Ranger/ans/normal50_fail.ans | 7 +
.../feature/Ranger/ans/normal50_success.ans | 6 +
src/test/feature/Ranger/ans/normal51_fail.ans | 7 +
.../feature/Ranger/ans/normal51_success.ans | 6 +
src/test/feature/Ranger/ans/normal52_fail.ans | 7 +
.../feature/Ranger/ans/normal52_success.ans | 6 +
src/test/feature/Ranger/ans/normal53_fail.ans | 7 +
.../feature/Ranger/ans/normal53_success.ans | 6 +
src/test/feature/Ranger/ans/normal54_fail.ans | 7 +
.../feature/Ranger/ans/normal54_success.ans | 6 +
src/test/feature/Ranger/ans/normal55_fail.ans | 12 ++
.../feature/Ranger/ans/normal55_success.ans | 11 ++
src/test/feature/Ranger/ans/normal56_fail.ans | 7 +
.../feature/Ranger/ans/normal56_success.ans | 6 +
src/test/feature/Ranger/ans/normal57_fail.ans | 14 ++
.../feature/Ranger/ans/normal57_success.ans | 10 ++
src/test/feature/Ranger/ans/normal58_fail.ans | 12 ++
.../feature/Ranger/ans/normal58_success.ans | 11 ++
src/test/feature/Ranger/ans/normal59_fail.ans | 12 ++
.../feature/Ranger/ans/normal59_success.ans | 13 ++
src/test/feature/Ranger/ans/normal5_success.ans | 7 +
src/test/feature/Ranger/ans/normal60_fail.ans | 7 +
.../feature/Ranger/ans/normal60_success.ans | 7 +
src/test/feature/Ranger/ans/normal61_fail.ans | 6 +
.../feature/Ranger/ans/normal61_success.ans | 6 +
src/test/feature/Ranger/ans/normal62_fail.ans | 7 +
.../feature/Ranger/ans/normal62_success.ans | 7 +
.../feature/Ranger/ans/normal63_success.ans | 92 +++++++++++
src/test/feature/Ranger/ans/normal64_fail.ans | 7 +
.../feature/Ranger/ans/normal64_success.ans | 6 +
src/test/feature/Ranger/ans/normal65_fail.ans | 7 +
.../feature/Ranger/ans/normal65_success.ans | 6 +
src/test/feature/Ranger/ans/normal66_fail.ans | 7 +
.../feature/Ranger/ans/normal66_success.ans | 6 +
src/test/feature/Ranger/ans/normal67_fail.ans | 7 +
.../feature/Ranger/ans/normal67_success.ans | 6 +
src/test/feature/Ranger/ans/normal68_fail.ans | 7 +
.../feature/Ranger/ans/normal68_success.ans | 6 +
src/test/feature/Ranger/ans/normal69_fail.ans | 7 +
.../feature/Ranger/ans/normal69_success.ans | 6 +
src/test/feature/Ranger/ans/normal6_success.ans | 6 +
src/test/feature/Ranger/ans/normal70_fail.ans | 7 +
.../feature/Ranger/ans/normal70_success.ans | 6 +
src/test/feature/Ranger/ans/normal71_fail.ans | 6 +
.../feature/Ranger/ans/normal71_success.ans | 6 +
src/test/feature/Ranger/ans/normal7_fail.ans | 7 +
src/test/feature/Ranger/ans/normal7_success.ans | 6 +
src/test/feature/Ranger/ans/normal8_fail.ans | 7 +
src/test/feature/Ranger/ans/normal8_success.ans | 6 +
src/test/feature/Ranger/ans/normal9_fail.ans | 7 +
src/test/feature/Ranger/ans/normal9_success.ans | 6 +
src/test/feature/Ranger/ans/super11_fail.ans | 6 +
src/test/feature/Ranger/ans/super11_success.ans | 6 +
src/test/feature/Ranger/ans/super12_success.ans | 6 +
src/test/feature/Ranger/ans/super17_success.ans | 6 +
src/test/feature/Ranger/ans/super18_success.ans | 6 +
src/test/feature/Ranger/ans/super19_success.ans | 6 +
src/test/feature/Ranger/ans/super23_success.ans | 6 +
src/test/feature/Ranger/ans/super24_fail.ans | 6 +
src/test/feature/Ranger/ans/super24_success.ans | 6 +
src/test/feature/Ranger/ans/super2_fail.ans | 6 +
src/test/feature/Ranger/ans/super2_success.ans | 6 +
src/test/feature/Ranger/ans/super3_fail.ans | 6 +
src/test/feature/Ranger/ans/super3_success.ans | 6 +
src/test/feature/Ranger/ans/super5_success.ans | 6 +
src/test/feature/Ranger/ans/super63_fail.ans | 10 ++
src/test/feature/Ranger/ans/super63_success.ans | 6 +
src/test/feature/Ranger/ans/super6_success.ans | 6 +
src/test/feature/Ranger/data/copydata.txt | 2 +
src/test/feature/Ranger/policy/1/1.json | 1 +
src/test/feature/Ranger/policy/10/1.json | 1 +
src/test/feature/Ranger/policy/10/2.json | 1 +
src/test/feature/Ranger/policy/10/3.json | 1 +
src/test/feature/Ranger/policy/11/1.json | 1 +
src/test/feature/Ranger/policy/13/1.json | 1 +
src/test/feature/Ranger/policy/14/1.json | 1 +
src/test/feature/Ranger/policy/15/1.json | 1 +
src/test/feature/Ranger/policy/16/1.json | 1 +
src/test/feature/Ranger/policy/2/1.json | 1 +
src/test/feature/Ranger/policy/20/1.json | 1 +
src/test/feature/Ranger/policy/20/2.json | 1 +
src/test/feature/Ranger/policy/21/1.json | 1 +
src/test/feature/Ranger/policy/21/2.json | 1 +
src/test/feature/Ranger/policy/22/1.json | 1 +
src/test/feature/Ranger/policy/24/1.json | 1 +
src/test/feature/Ranger/policy/25/1.json | 1 +
src/test/feature/Ranger/policy/25/2.json | 1 +
src/test/feature/Ranger/policy/26/1.json | 1 +
src/test/feature/Ranger/policy/27/1.json | 1 +
src/test/feature/Ranger/policy/27/2.json | 1 +
src/test/feature/Ranger/policy/28/1.json | 1 +
src/test/feature/Ranger/policy/28/2.json | 1 +
src/test/feature/Ranger/policy/29/1.json | 1 +
src/test/feature/Ranger/policy/29/2.json | 1 +
src/test/feature/Ranger/policy/3/1.json | 1 +
src/test/feature/Ranger/policy/30/1.json | 1 +
src/test/feature/Ranger/policy/31/1.json | 1 +
src/test/feature/Ranger/policy/32/1.json | 1 +
src/test/feature/Ranger/policy/33/1.json | 1 +
src/test/feature/Ranger/policy/33/2.json | 1 +
src/test/feature/Ranger/policy/34/1.json | 1 +
src/test/feature/Ranger/policy/35/1.json | 1 +
src/test/feature/Ranger/policy/35/2.json | 1 +
src/test/feature/Ranger/policy/36/1.json | 1 +
src/test/feature/Ranger/policy/37/1.json | 1 +
src/test/feature/Ranger/policy/38/1.json | 1 +
src/test/feature/Ranger/policy/38/2.json | 1 +
src/test/feature/Ranger/policy/39/1.json | 1 +
src/test/feature/Ranger/policy/39/2.json | 1 +
src/test/feature/Ranger/policy/4/1.json | 1 +
src/test/feature/Ranger/policy/4/2.json | 1 +
src/test/feature/Ranger/policy/4/3.json | 1 +
src/test/feature/Ranger/policy/40/1.json | 1 +
src/test/feature/Ranger/policy/40/2.json | 1 +
src/test/feature/Ranger/policy/40/3.json | 1 +
src/test/feature/Ranger/policy/41/1.json | 1 +
src/test/feature/Ranger/policy/41/2.json | 1 +
src/test/feature/Ranger/policy/42/1.json | 1 +
src/test/feature/Ranger/policy/43/1.json | 1 +
src/test/feature/Ranger/policy/43/2.json | 1 +
src/test/feature/Ranger/policy/43/3.json | 1 +
src/test/feature/Ranger/policy/44/1.json | 1 +
src/test/feature/Ranger/policy/44/2.json | 1 +
src/test/feature/Ranger/policy/45/1.json | 1 +
src/test/feature/Ranger/policy/45/2.json | 1 +
src/test/feature/Ranger/policy/45/3.json | 1 +
src/test/feature/Ranger/policy/46/1.json | 1 +
src/test/feature/Ranger/policy/46/2.json | 1 +
src/test/feature/Ranger/policy/47/1.json | 1 +
src/test/feature/Ranger/policy/47/2.json | 1 +
src/test/feature/Ranger/policy/48/1.json | 1 +
src/test/feature/Ranger/policy/48/2.json | 1 +
src/test/feature/Ranger/policy/48/3.json | 1 +
src/test/feature/Ranger/policy/49/1.json | 1 +
src/test/feature/Ranger/policy/49/2.json | 1 +
src/test/feature/Ranger/policy/50/1.json | 1 +
src/test/feature/Ranger/policy/51/1.json | 1 +
src/test/feature/Ranger/policy/52/1.json | 1 +
src/test/feature/Ranger/policy/53/1.json | 1 +
src/test/feature/Ranger/policy/54/1.json | 1 +
src/test/feature/Ranger/policy/54/2.json | 1 +
src/test/feature/Ranger/policy/54/3.json | 1 +
src/test/feature/Ranger/policy/55/1.json | 1 +
src/test/feature/Ranger/policy/55/2.json | 1 +
src/test/feature/Ranger/policy/55/3.json | 1 +
src/test/feature/Ranger/policy/56/1.json | 1 +
src/test/feature/Ranger/policy/57/1.json | 1 +
src/test/feature/Ranger/policy/57/2.json | 1 +
src/test/feature/Ranger/policy/57/3.json | 1 +
src/test/feature/Ranger/policy/58/1.json | 1 +
src/test/feature/Ranger/policy/58/2.json | 1 +
src/test/feature/Ranger/policy/59/1.json | 1 +
src/test/feature/Ranger/policy/60/1.json | 1 +
src/test/feature/Ranger/policy/60/2.json | 1 +
src/test/feature/Ranger/policy/61/1.json | 1 +
src/test/feature/Ranger/policy/61/2.json | 1 +
src/test/feature/Ranger/policy/61/3.json | 1 +
src/test/feature/Ranger/policy/62/1.json | 1 +
src/test/feature/Ranger/policy/63/1.json | 1 +
src/test/feature/Ranger/policy/63/2.json | 1 +
src/test/feature/Ranger/policy/63/3.json | 1 +
src/test/feature/Ranger/policy/63/4.json | 1 +
src/test/feature/Ranger/policy/64/1.json | 1 +
src/test/feature/Ranger/policy/65/1.json | 1 +
src/test/feature/Ranger/policy/66/1.json | 1 +
src/test/feature/Ranger/policy/67/1.json | 1 +
src/test/feature/Ranger/policy/68/1.json | 1 +
src/test/feature/Ranger/policy/69/1.json | 1 +
src/test/feature/Ranger/policy/7/1.json | 1 +
src/test/feature/Ranger/policy/7/2.json | 1 +
src/test/feature/Ranger/policy/7/3.json | 1 +
src/test/feature/Ranger/policy/70/1.json | 1 +
src/test/feature/Ranger/policy/71/1.json | 1 +
src/test/feature/Ranger/policy/8/1.json | 1 +
src/test/feature/Ranger/policy/8/2.json | 1 +
src/test/feature/Ranger/policy/8/3.json | 1 +
src/test/feature/Ranger/policy/9/1.json | 1 +
src/test/feature/Ranger/rangerpolicy.py | 100 ++++++++++++
src/test/feature/Ranger/rangerrest.py | 86 ++++++++++
src/test/feature/Ranger/rangeruser.py | 117 ++++++++++++++
src/test/feature/Ranger/sql/admin/1.sql | 2 +
src/test/feature/Ranger/sql/admin/10.sql | 2 +
src/test/feature/Ranger/sql/admin/11.sql | 2 +
src/test/feature/Ranger/sql/admin/12.sql | 2 +
src/test/feature/Ranger/sql/admin/13.sql | 2 +
src/test/feature/Ranger/sql/admin/14.sql | 2 +
src/test/feature/Ranger/sql/admin/15.sql | 2 +
src/test/feature/Ranger/sql/admin/16.sql | 2 +
src/test/feature/Ranger/sql/admin/17.sql | 2 +
src/test/feature/Ranger/sql/admin/18.sql | 2 +
src/test/feature/Ranger/sql/admin/19.sql | 2 +
src/test/feature/Ranger/sql/admin/2.sql | 2 +
src/test/feature/Ranger/sql/admin/20.sql | 2 +
src/test/feature/Ranger/sql/admin/21.sql | 2 +
src/test/feature/Ranger/sql/admin/22.sql | 2 +
src/test/feature/Ranger/sql/admin/23.sql | 2 +
src/test/feature/Ranger/sql/admin/24.sql | 2 +
src/test/feature/Ranger/sql/admin/25.sql | 2 +
src/test/feature/Ranger/sql/admin/26.sql | 2 +
src/test/feature/Ranger/sql/admin/27.sql | 2 +
src/test/feature/Ranger/sql/admin/28.sql | 2 +
src/test/feature/Ranger/sql/admin/29.sql | 2 +
src/test/feature/Ranger/sql/admin/3.sql | 2 +
src/test/feature/Ranger/sql/admin/30.sql | 2 +
src/test/feature/Ranger/sql/admin/31.sql | 2 +
src/test/feature/Ranger/sql/admin/32.sql | 2 +
src/test/feature/Ranger/sql/admin/33.sql | 2 +
src/test/feature/Ranger/sql/admin/34.sql | 2 +
src/test/feature/Ranger/sql/admin/35.sql | 2 +
src/test/feature/Ranger/sql/admin/36.sql | 2 +
src/test/feature/Ranger/sql/admin/37.sql | 2 +
src/test/feature/Ranger/sql/admin/38.sql | 2 +
src/test/feature/Ranger/sql/admin/39.sql | 2 +
src/test/feature/Ranger/sql/admin/4.sql | 2 +
src/test/feature/Ranger/sql/admin/40.sql | 2 +
src/test/feature/Ranger/sql/admin/41.sql | 2 +
src/test/feature/Ranger/sql/admin/42.sql | 2 +
src/test/feature/Ranger/sql/admin/43.sql | 2 +
src/test/feature/Ranger/sql/admin/44.sql | 2 +
src/test/feature/Ranger/sql/admin/45.sql | 2 +
src/test/feature/Ranger/sql/admin/46.sql | 2 +
src/test/feature/Ranger/sql/admin/47.sql | 2 +
src/test/feature/Ranger/sql/admin/48.sql | 2 +
src/test/feature/Ranger/sql/admin/49.sql | 2 +
src/test/feature/Ranger/sql/admin/5.sql | 2 +
src/test/feature/Ranger/sql/admin/50.sql | 2 +
src/test/feature/Ranger/sql/admin/51.sql | 2 +
src/test/feature/Ranger/sql/admin/52.sql | 2 +
src/test/feature/Ranger/sql/admin/53.sql | 2 +
src/test/feature/Ranger/sql/admin/54.sql | 2 +
src/test/feature/Ranger/sql/admin/55.sql | 2 +
src/test/feature/Ranger/sql/admin/56.sql | 2 +
src/test/feature/Ranger/sql/admin/57.sql | 2 +
src/test/feature/Ranger/sql/admin/58.sql | 2 +
src/test/feature/Ranger/sql/admin/59.sql | 2 +
src/test/feature/Ranger/sql/admin/6.sql | 2 +
src/test/feature/Ranger/sql/admin/60.sql | 2 +
src/test/feature/Ranger/sql/admin/61.sql | 2 +
src/test/feature/Ranger/sql/admin/62.sql | 2 +
src/test/feature/Ranger/sql/admin/63.sql | 2 +
src/test/feature/Ranger/sql/admin/64.sql | 2 +
src/test/feature/Ranger/sql/admin/65.sql | 2 +
src/test/feature/Ranger/sql/admin/66.sql | 2 +
src/test/feature/Ranger/sql/admin/67.sql | 2 +
src/test/feature/Ranger/sql/admin/68.sql | 2 +
src/test/feature/Ranger/sql/admin/69.sql | 2 +
src/test/feature/Ranger/sql/admin/7.sql | 2 +
src/test/feature/Ranger/sql/admin/70.sql | 2 +
src/test/feature/Ranger/sql/admin/71.sql | 2 +
src/test/feature/Ranger/sql/admin/8.sql | 2 +
src/test/feature/Ranger/sql/admin/9.sql | 2 +
src/test/feature/Ranger/sql/init_file | 7 +
src/test/feature/Ranger/sql/normal/1.sql | 3 +
src/test/feature/Ranger/sql/normal/10.sql | 3 +
src/test/feature/Ranger/sql/normal/11.sql | 3 +
src/test/feature/Ranger/sql/normal/12.sql | 3 +
src/test/feature/Ranger/sql/normal/13.sql | 3 +
src/test/feature/Ranger/sql/normal/14.sql | 3 +
src/test/feature/Ranger/sql/normal/15.sql | 3 +
src/test/feature/Ranger/sql/normal/16.sql | 3 +
src/test/feature/Ranger/sql/normal/17.sql | 3 +
src/test/feature/Ranger/sql/normal/18.sql | 3 +
src/test/feature/Ranger/sql/normal/19.sql | 3 +
src/test/feature/Ranger/sql/normal/2.sql | 3 +
src/test/feature/Ranger/sql/normal/20.sql | 3 +
src/test/feature/Ranger/sql/normal/21.sql | 3 +
src/test/feature/Ranger/sql/normal/22.sql | 3 +
src/test/feature/Ranger/sql/normal/23.sql | 3 +
src/test/feature/Ranger/sql/normal/24.sql | 3 +
src/test/feature/Ranger/sql/normal/25.sql | 3 +
src/test/feature/Ranger/sql/normal/26.sql | 3 +
src/test/feature/Ranger/sql/normal/27.sql | 3 +
src/test/feature/Ranger/sql/normal/28.sql | 3 +
src/test/feature/Ranger/sql/normal/29.sql | 3 +
src/test/feature/Ranger/sql/normal/3.sql | 3 +
src/test/feature/Ranger/sql/normal/30.sql | 3 +
src/test/feature/Ranger/sql/normal/31.sql | 3 +
src/test/feature/Ranger/sql/normal/32.sql | 3 +
src/test/feature/Ranger/sql/normal/33.sql | 3 +
src/test/feature/Ranger/sql/normal/34.sql | 3 +
src/test/feature/Ranger/sql/normal/35.sql | 3 +
src/test/feature/Ranger/sql/normal/36.sql | 3 +
src/test/feature/Ranger/sql/normal/37.sql | 3 +
src/test/feature/Ranger/sql/normal/38.sql | 3 +
src/test/feature/Ranger/sql/normal/39.sql | 3 +
src/test/feature/Ranger/sql/normal/4.sql | 3 +
src/test/feature/Ranger/sql/normal/40.sql | 3 +
src/test/feature/Ranger/sql/normal/41.sql | 3 +
src/test/feature/Ranger/sql/normal/42.sql | 3 +
src/test/feature/Ranger/sql/normal/43.sql | 3 +
src/test/feature/Ranger/sql/normal/44.sql | 3 +
src/test/feature/Ranger/sql/normal/45.sql | 3 +
src/test/feature/Ranger/sql/normal/46.sql | 3 +
src/test/feature/Ranger/sql/normal/47.sql | 3 +
src/test/feature/Ranger/sql/normal/48.sql | 3 +
src/test/feature/Ranger/sql/normal/49.sql | 3 +
src/test/feature/Ranger/sql/normal/5.sql | 3 +
src/test/feature/Ranger/sql/normal/50.sql | 3 +
src/test/feature/Ranger/sql/normal/51.sql | 3 +
src/test/feature/Ranger/sql/normal/52.sql | 3 +
src/test/feature/Ranger/sql/normal/53.sql | 3 +
src/test/feature/Ranger/sql/normal/54.sql | 3 +
src/test/feature/Ranger/sql/normal/55.sql | 3 +
src/test/feature/Ranger/sql/normal/56.sql | 3 +
src/test/feature/Ranger/sql/normal/57.sql | 3 +
src/test/feature/Ranger/sql/normal/58.sql | 3 +
src/test/feature/Ranger/sql/normal/59.sql | 3 +
src/test/feature/Ranger/sql/normal/6.sql | 3 +
src/test/feature/Ranger/sql/normal/60.sql | 3 +
src/test/feature/Ranger/sql/normal/61.sql | 3 +
src/test/feature/Ranger/sql/normal/62.sql | 3 +
src/test/feature/Ranger/sql/normal/63.sql | 3 +
src/test/feature/Ranger/sql/normal/64.sql | 3 +
src/test/feature/Ranger/sql/normal/65.sql | 3 +
src/test/feature/Ranger/sql/normal/66.sql | 3 +
src/test/feature/Ranger/sql/normal/67.sql | 3 +
src/test/feature/Ranger/sql/normal/68.sql | 3 +
src/test/feature/Ranger/sql/normal/69.sql | 3 +
src/test/feature/Ranger/sql/normal/7.sql | 3 +
src/test/feature/Ranger/sql/normal/70.sql | 3 +
src/test/feature/Ranger/sql/normal/71.sql | 3 +
src/test/feature/Ranger/sql/normal/8.sql | 3 +
src/test/feature/Ranger/sql/normal/9.sql | 3 +
src/test/feature/Ranger/sql/sqlsplit.cpp | 92 +++++++++++
src/test/feature/Ranger/sql/sqlsplitinput | 142 +++++++++++++++++
src/test/feature/Ranger/sql/super/11.sql | 3 +
src/test/feature/Ranger/sql/super/12.sql | 3 +
src/test/feature/Ranger/sql/super/17.sql | 3 +
src/test/feature/Ranger/sql/super/18.sql | 3 +
src/test/feature/Ranger/sql/super/19.sql | 3 +
src/test/feature/Ranger/sql/super/2.sql | 3 +
src/test/feature/Ranger/sql/super/23.sql | 3 +
src/test/feature/Ranger/sql/super/24.sql | 3 +
src/test/feature/Ranger/sql/super/3.sql | 3 +
src/test/feature/Ranger/sql/super/5.sql | 3 +
src/test/feature/Ranger/sql/super/6.sql | 3 +
src/test/feature/Ranger/sql/super/63.sql | 3 +
src/test/feature/Ranger/test_ranger.cpp | 159 +++++++++++++++++++
src/test/feature/Ranger/test_ranger.h | 33 ++++
src/test/feature/lib/gpfdist.cpp | 7 -
src/test/feature/lib/psql.cpp | 13 +-
src/test/feature/lib/psql.h | 4 +-
src/test/feature/lib/sql_util.cpp | 17 +-
src/test/feature/lib/sql_util.h | 7 +-
src/test/feature/sanity_tests.txt | 2 +-
567 files changed, 3149 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/ExternalSource/test_errortbl.cpp
----------------------------------------------------------------------
diff --git a/src/test/feature/ExternalSource/test_errortbl.cpp b/src/test/feature/ExternalSource/test_errortbl.cpp
index a11a8df..7409f81 100644
--- a/src/test/feature/ExternalSource/test_errortbl.cpp
+++ b/src/test/feature/ExternalSource/test_errortbl.cpp
@@ -102,5 +102,13 @@ TEST_F(TestErrorTable, TestErrorTableAll) {
"LOG ERRORS INTO EXT_NATION_ERROR_WRITABLE SEGMENT REJECT LIMIT 5;",
false);
+ util.execute("drop external table EXT_NATION_WITH_EXIST_ERROR_TABLE;");
+ util.execute("drop external table EXT_NATION1;");
+ util.execute("drop table EXT_NATION_ERROR1 CASCADE;");
+ util.execute("drop external table EXT_NATION2;");
+ util.execute("drop table EXT_NATION_ERROR2 CASCADE;");
+ util.execute("drop external table EXT_NATION3;");
+ util.execute("drop table EXT_NATION_ERROR3 CASCADE;");
+
gpdfist.finalize_gpfdist();
}
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst1.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst1.ans b/src/test/feature/Ranger/ans/adminfirst1.ans
new file mode 100644
index 0000000..b9fca34
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst1.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table a(i int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst10.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst10.ans b/src/test/feature/Ranger/ans/adminfirst10.ans
new file mode 100644
index 0000000..ca24909
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst10.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst11.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst11.ans b/src/test/feature/Ranger/ans/adminfirst11.ans
new file mode 100644
index 0000000..1a5787c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst11.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+CREATE OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst12.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst12.ans b/src/test/feature/Ranger/ans/adminfirst12.ans
new file mode 100644
index 0000000..2ec6c82
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst12.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop OPERATOR CLASS sva_special_ops USING btree;
+DROP OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst13.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst13.ans b/src/test/feature/Ranger/ans/adminfirst13.ans
new file mode 100644
index 0000000..e5b435e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst13.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop OPERATOR <# (text,text) CASCADE;
+DROP OPERATOR
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst14.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst14.ans b/src/test/feature/Ranger/ans/adminfirst14.ans
new file mode 100644
index 0000000..150db1e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst14.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION si_same(text, text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst15.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst15.ans b/src/test/feature/Ranger/ans/adminfirst15.ans
new file mode 100644
index 0000000..56708c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst15.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION si_lt(text, text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst16.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst16.ans b/src/test/feature/Ranger/ans/adminfirst16.ans
new file mode 100644
index 0000000..2f4e41c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst16.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION normalize_si(text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst17.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst17.ans b/src/test/feature/Ranger/ans/adminfirst17.ans
new file mode 100644
index 0000000..78b7091
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst17.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+CREATE QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst18.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst18.ans b/src/test/feature/Ranger/ans/adminfirst18.ans
new file mode 100644
index 0000000..c0721f9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst18.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP RESOURCE QUEUE myqueue;
+DROP QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst19.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst19.ans b/src/test/feature/Ranger/ans/adminfirst19.ans
new file mode 100644
index 0000000..e32ffa2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst19.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+CREATE TABLESPACE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst2.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst2.ans b/src/test/feature/Ranger/ans/adminfirst2.ans
new file mode 100644
index 0000000..3c74a36
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst2.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create language plpythonu;
+CREATE LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst20.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst20.ans b/src/test/feature/Ranger/ans/adminfirst20.ans
new file mode 100644
index 0000000..0136985
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst20.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst21.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst21.ans b/src/test/feature/Ranger/ans/adminfirst21.ans
new file mode 100644
index 0000000..ee188ab
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst21.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into foo(i) values(1234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst22.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst22.ans b/src/test/feature/Ranger/ans/adminfirst22.ans
new file mode 100644
index 0000000..b6a0d25
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst22.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table foo;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst23.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst23.ans b/src/test/feature/Ranger/ans/adminfirst23.ans
new file mode 100644
index 0000000..30a0e21
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst23.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop tablespace mytblspace;
+DROP TABLESPACE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst24.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst24.ans b/src/test/feature/Ranger/ans/adminfirst24.ans
new file mode 100644
index 0000000..2fc5625
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst24.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+COPY a FROM '/tmp/a.txt';
+COPY 2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst25.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst25.ans b/src/test/feature/Ranger/ans/adminfirst25.ans
new file mode 100644
index 0000000..dc309a6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst25.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+COPY a TO STDOUT WITH DELIMITER '|';
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst26.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst26.ans b/src/test/feature/Ranger/ans/adminfirst26.ans
new file mode 100644
index 0000000..fffdc0e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst26.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+CREATE EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst27.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst27.ans b/src/test/feature/Ranger/ans/adminfirst27.ans
new file mode 100644
index 0000000..842a8b6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst27.ans
@@ -0,0 +1,29 @@
+-- start_ignore
+-- end_ignore
+select * from ext_t order by N_NATIONKEY;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: Found 50 data formatting errors (50 or more input rows). Rejected related input data.
+0|ALGERIA |0| haggle. carefully final deposits detect slyly agai
+1|ARGENTINA |1|al foxes promise slyly according to the regular accounts. bold requests alon
+2|BRAZIL |1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
+3|CANADA |1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
+4|EGYPT |4|y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
+5|ETHIOPIA |0|ven packages wake quickly. regu
+6|FRANCE |3|refully final requests. regular, ironi
+7|GERMANY |3|l platelets. regular accounts x-ray: unusual, regular acco
+8|INDIA |2|ss excuses cajole slyly across the packages. deposits print aroun
+9|INDONESIA |2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull
+10|IRAN |4|efully alongside of the slyly final dependencies.
+11|IRAQ |4|nic deposits boost atop the quickly final requests? quickly regula
+12|JAPAN |2|ously. final, express gifts cajole a
+13|JORDAN |4|ic deposits are blithely about the carefully regular pa
+14|KENYA |0| pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+15|MOROCCO |0|rns. blithely bold courts among the closely regular packages use furiously bold platelets?
+16|MOZAMBIQUE |0|s. ironic, unusual asymptotes wake blithely r
+17|PERU |1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+18|CHINA |2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos
+19|ROMANIA |3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account
+20|SAUDI ARABIA |4|ts. silent requests haggle. closely express packages sleep across the blithely
+21|VIETNAM |2|hely enticingly express accounts. even, final
+22|RUSSIA |3| requests against the platelets use never according to the quickly regular pint
+23|UNITED KINGDOM |3|eans boost carefully special requests. accounts are. carefull
+24|UNITED STATES |1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst28.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst28.ans b/src/test/feature/Ranger/ans/adminfirst28.ans
new file mode 100644
index 0000000..b14ade2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst28.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+CREATE EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst29.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst29.ans b/src/test/feature/Ranger/ans/adminfirst29.ans
new file mode 100644
index 0000000..3d0587f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst29.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into ext_t2(i) values(234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst3.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst3.ans b/src/test/feature/Ranger/ans/adminfirst3.ans
new file mode 100644
index 0000000..d0b2353
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst3.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst30.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst30.ans b/src/test/feature/Ranger/ans/adminfirst30.ans
new file mode 100644
index 0000000..278ff6c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst30.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop EXTERNAL TABLE ext_t;
+DROP EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst31.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst31.ans b/src/test/feature/Ranger/ans/adminfirst31.ans
new file mode 100644
index 0000000..dfeb2dc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst31.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop EXTERNAL TABLE ext_t2;
+DROP EXTERNAL TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst32.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst32.ans b/src/test/feature/Ranger/ans/adminfirst32.ans
new file mode 100644
index 0000000..9be07d2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst32.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create schema sa;
+CREATE SCHEMA
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst33.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst33.ans b/src/test/feature/Ranger/ans/adminfirst33.ans
new file mode 100644
index 0000000..d286367
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst33.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create temp table ta(i int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst34.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst34.ans b/src/test/feature/Ranger/ans/adminfirst34.ans
new file mode 100644
index 0000000..eb4429f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst34.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create view av as select * from a order by i;
+CREATE VIEW
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst35.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst35.ans b/src/test/feature/Ranger/ans/adminfirst35.ans
new file mode 100644
index 0000000..6f7bf29
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst35.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table aa as select * from a order by i;
+SELECT 2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst36.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst36.ans b/src/test/feature/Ranger/ans/adminfirst36.ans
new file mode 100644
index 0000000..429211d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst36.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table sa.t(a int, b int);
+CREATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst37.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst37.ans b/src/test/feature/Ranger/ans/adminfirst37.ans
new file mode 100644
index 0000000..a84343d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst37.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE SEQUENCE myseq START 1;
+CREATE SEQUENCE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst38.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst38.ans b/src/test/feature/Ranger/ans/adminfirst38.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst38.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst39.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst39.ans b/src/test/feature/Ranger/ans/adminfirst39.ans
new file mode 100644
index 0000000..eb0b157
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst39.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a values(1);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst4.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst4.ans b/src/test/feature/Ranger/ans/adminfirst4.ans
new file mode 100644
index 0000000..5a06518
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst4.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+select * from f4();
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst40.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst40.ans b/src/test/feature/Ranger/ans/adminfirst40.ans
new file mode 100644
index 0000000..7a178c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst40.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into a VALUES (nextval('myseq'));
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst41.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst41.ans b/src/test/feature/Ranger/ans/adminfirst41.ans
new file mode 100644
index 0000000..d28e95d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst41.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+select * from a order by i;
+1
+1
+1
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst42.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst42.ans b/src/test/feature/Ranger/ans/adminfirst42.ans
new file mode 100644
index 0000000..09dd411
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst42.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+select generate_series(1,3);
+1
+2
+3
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst43.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst43.ans b/src/test/feature/Ranger/ans/adminfirst43.ans
new file mode 100644
index 0000000..d877593
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst43.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+select * from av;
+1
+1
+1
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst44.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst44.ans b/src/test/feature/Ranger/ans/adminfirst44.ans
new file mode 100644
index 0000000..ce8e756
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst44.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT setval('myseq', 1);
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst45.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst45.ans b/src/test/feature/Ranger/ans/adminfirst45.ans
new file mode 100644
index 0000000..8c146c7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst45.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+SELECT * INTO aaa FROM a WHERE i > 0 order by i;
+SELECT 5
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst46.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst46.ans b/src/test/feature/Ranger/ans/adminfirst46.ans
new file mode 100644
index 0000000..a8582d8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst46.ans
@@ -0,0 +1,6 @@
+-- start_ignore
+-- end_ignore
+PREPARE fooplan (int) AS INSERT INTO a VALUES($1);EXECUTE fooplan(1);DEALLOCATE fooplan;
+PREPARE
+INSERT 0 1
+DEALLOCATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst47.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst47.ans b/src/test/feature/Ranger/ans/adminfirst47.ans
new file mode 100644
index 0000000..c3aa5ee
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst47.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+explain select * from a;
+Gather Motion 1:1 (slice1; segments: 1) (cost=0.00..1.02 rows=2 width=4)
+ -> Append-only Scan on a (cost=0.00..1.02 rows=2 width=4)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst48.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst48.ans b/src/test/feature/Ranger/ans/adminfirst48.ans
new file mode 100644
index 0000000..fdaa03b
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst48.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION scube_accum(numeric, numeric) RETURNS numeric AS 'select $1 + $2 * $2 * $2' LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst49.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst49.ans b/src/test/feature/Ranger/ans/adminfirst49.ans
new file mode 100644
index 0000000..fc2f8b2
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst49.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE AGGREGATE scube(numeric) ( SFUNC = scube_accum, STYPE = numeric, INITCOND = 0 );
+CREATE AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst5.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst5.ans b/src/test/feature/Ranger/ans/adminfirst5.ans
new file mode 100644
index 0000000..9a6a74f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst5.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop function f4();
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst50.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst50.ans b/src/test/feature/Ranger/ans/adminfirst50.ans
new file mode 100644
index 0000000..c0e6523
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst50.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+ALTER AGGREGATE scube(numeric) RENAME TO scube2;
+ALTER AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst51.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst51.ans b/src/test/feature/Ranger/ans/adminfirst51.ans
new file mode 100644
index 0000000..aa4f869
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst51.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP AGGREGATE scube2(numeric);
+DROP AGGREGATE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst52.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst52.ans b/src/test/feature/Ranger/ans/adminfirst52.ans
new file mode 100644
index 0000000..af03391
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst52.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP FUNCTION scube_accum(numeric, numeric);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst53.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst53.ans b/src/test/feature/Ranger/ans/adminfirst53.ans
new file mode 100644
index 0000000..4eaf4cc
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst53.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TYPE mytype AS (f1 int, f2 int);
+CREATE TYPE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst54.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst54.ans b/src/test/feature/Ranger/ans/adminfirst54.ans
new file mode 100644
index 0000000..c8bb63f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst54.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE FUNCTION getfoo() RETURNS SETOF mytype AS $$ SELECT i, i FROM a order by i $$ LANGUAGE SQL;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst55.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst55.ans b/src/test/feature/Ranger/ans/adminfirst55.ans
new file mode 100644
index 0000000..ae52d70
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst55.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+select getfoo();
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
+(1,1)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst56.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst56.ans b/src/test/feature/Ranger/ans/adminfirst56.ans
new file mode 100644
index 0000000..7577294
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst56.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop type mytype cascade;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: drop cascades to function getfoo()
+DROP TYPE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst57.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst57.ans b/src/test/feature/Ranger/ans/adminfirst57.ans
new file mode 100644
index 0000000..1dd130e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst57.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+begin; DECLARE mycursor CURSOR FOR SELECT * FROM a order by i; FETCH FORWARD 2 FROM mycursor; commit;
+BEGIN
+DECLARE CURSOR
+1
+1
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst58.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst58.ans b/src/test/feature/Ranger/ans/adminfirst58.ans
new file mode 100644
index 0000000..3b7fd19
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst58.ans
@@ -0,0 +1,9 @@
+-- start_ignore
+-- end_ignore
+BEGIN; INSERT INTO a VALUES (1); SAVEPOINT my_savepoint; INSERT INTO a VALUES (1); RELEASE SAVEPOINT my_savepoint; COMMIT;
+BEGIN
+INSERT 0 1
+SAVEPOINT
+INSERT 0 1
+RELEASE
+COMMIT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst59.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst59.ans b/src/test/feature/Ranger/ans/adminfirst59.ans
new file mode 100644
index 0000000..c4eb2ef
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst59.ans
@@ -0,0 +1,8 @@
+-- start_ignore
+-- end_ignore
+\d
+public|a|table|huanzhang|append only
+public|aa|table|huanzhang|append only
+public|aaa|table|huanzhang|append only
+public|av|view|huanzhang|none
+public|myseq|sequence|huanzhang|heap
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst6.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst6.ans b/src/test/feature/Ranger/ans/adminfirst6.ans
new file mode 100644
index 0000000..8691498
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst6.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop language plpythonu;
+DROP LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst60.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst60.ans b/src/test/feature/Ranger/ans/adminfirst60.ans
new file mode 100644
index 0000000..f235f1e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst60.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze a;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst61.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst61.ans b/src/test/feature/Ranger/ans/adminfirst61.ans
new file mode 100644
index 0000000..36b8749
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst61.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+analyze;
+ANALYZE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst62.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst62.ans b/src/test/feature/Ranger/ans/adminfirst62.ans
new file mode 100644
index 0000000..3281aef
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst62.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum aa;
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst63.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst63.ans b/src/test/feature/Ranger/ans/adminfirst63.ans
new file mode 100644
index 0000000..15dac5d
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst63.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+vacuum analyze;
+VACUUM
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst64.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst64.ans b/src/test/feature/Ranger/ans/adminfirst64.ans
new file mode 100644
index 0000000..7565e97
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst64.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+truncate aa;
+TRUNCATE TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst65.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst65.ans b/src/test/feature/Ranger/ans/adminfirst65.ans
new file mode 100644
index 0000000..1f19c46
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst65.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+alter table a rename column i to j;
+ALTER TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst66.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst66.ans b/src/test/feature/Ranger/ans/adminfirst66.ans
new file mode 100644
index 0000000..6779298
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst66.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop SEQUENCE myseq;
+DROP SEQUENCE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst67.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst67.ans b/src/test/feature/Ranger/ans/adminfirst67.ans
new file mode 100644
index 0000000..7b67364
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst67.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop view av;
+DROP VIEW
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst68.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst68.ans b/src/test/feature/Ranger/ans/adminfirst68.ans
new file mode 100644
index 0000000..071be2a
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst68.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aaa;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst69.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst69.ans b/src/test/feature/Ranger/ans/adminfirst69.ans
new file mode 100644
index 0000000..e203c88
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst69.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table aa;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst7.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst7.ans b/src/test/feature/Ranger/ans/adminfirst7.ans
new file mode 100644
index 0000000..5026d33
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst7.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION normalize_si(text) RETURNS text AS $$ BEGIN RETURN substring($1, 9, 2) || substring($1, 7, 2) || substring($1, 5, 2) || substring($1, 1, 4); END; $$LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst70.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst70.ans b/src/test/feature/Ranger/ans/adminfirst70.ans
new file mode 100644
index 0000000..e7fbc71
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst70.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table a;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst71.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst71.ans b/src/test/feature/Ranger/ans/adminfirst71.ans
new file mode 100644
index 0000000..a9779cf
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst71.ans
@@ -0,0 +1,5 @@
+-- start_ignore
+-- end_ignore
+drop schema sa CASCADE;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: drop cascades to append only table sa.t
+DROP SCHEMA
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst8.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst8.ans b/src/test/feature/Ranger/ans/adminfirst8.ans
new file mode 100644
index 0000000..03712a3
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst8.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION si_lt(text, text) RETURNS boolean AS $$ BEGIN RETURN normalize_si($1) < normalize_si($2); END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminfirst9.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminfirst9.ans b/src/test/feature/Ranger/ans/adminfirst9.ans
new file mode 100644
index 0000000..b2aaca8
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminfirst9.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OPERATOR <# ( PROCEDURE=si_lt,LEFTARG=text, RIGHTARG=text);
+CREATE OPERATOR
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond1.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond1.ans b/src/test/feature/Ranger/ans/adminsecond1.ans
new file mode 100644
index 0000000..64c6082
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond1.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create table a(i int);
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "a" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond10.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond10.ans b/src/test/feature/Ranger/ans/adminsecond10.ans
new file mode 100644
index 0000000..ca24909
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond10.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond11.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond11.ans b/src/test/feature/Ranger/ans/adminsecond11.ans
new file mode 100644
index 0000000..1a5787c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond11.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+CREATE OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond12.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond12.ans b/src/test/feature/Ranger/ans/adminsecond12.ans
new file mode 100644
index 0000000..2ec6c82
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond12.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop OPERATOR CLASS sva_special_ops USING btree;
+DROP OPERATOR CLASS
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond13.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond13.ans b/src/test/feature/Ranger/ans/adminsecond13.ans
new file mode 100644
index 0000000..e5b435e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond13.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop OPERATOR <# (text,text) CASCADE;
+DROP OPERATOR
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond14.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond14.ans b/src/test/feature/Ranger/ans/adminsecond14.ans
new file mode 100644
index 0000000..150db1e
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond14.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION si_same(text, text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond15.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond15.ans b/src/test/feature/Ranger/ans/adminsecond15.ans
new file mode 100644
index 0000000..56708c6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond15.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION si_lt(text, text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond16.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond16.ans b/src/test/feature/Ranger/ans/adminsecond16.ans
new file mode 100644
index 0000000..2f4e41c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond16.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop FUNCTION normalize_si(text);
+DROP FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond17.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond17.ans b/src/test/feature/Ranger/ans/adminsecond17.ans
new file mode 100644
index 0000000..78b7091
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond17.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE RESOURCE QUEUE myqueue WITH (PARENT='pg_root', ACTIVE_STATEMENTS=20, MEMORY_LIMIT_CLUSTER=50%, CORE_LIMIT_CLUSTER=50%);
+CREATE QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond18.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond18.ans b/src/test/feature/Ranger/ans/adminsecond18.ans
new file mode 100644
index 0000000..c0721f9
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond18.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+DROP RESOURCE QUEUE myqueue;
+DROP QUEUE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond19.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond19.ans b/src/test/feature/Ranger/ans/adminsecond19.ans
new file mode 100644
index 0000000..91ced40
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond19.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TABLESPACE mytblspace FILESPACE dfs_system;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: tablespace "mytblspace" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond2.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond2.ans b/src/test/feature/Ranger/ans/adminsecond2.ans
new file mode 100644
index 0000000..3c74a36
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond2.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+create language plpythonu;
+CREATE LANGUAGE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond20.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond20.ans b/src/test/feature/Ranger/ans/adminsecond20.ans
new file mode 100644
index 0000000..4c27ee0
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond20.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE TABLE foo(i int) TABLESPACE mytblspace;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "foo" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond21.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond21.ans b/src/test/feature/Ranger/ans/adminsecond21.ans
new file mode 100644
index 0000000..ee188ab
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond21.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into foo(i) values(1234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond22.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond22.ans b/src/test/feature/Ranger/ans/adminsecond22.ans
new file mode 100644
index 0000000..b6a0d25
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond22.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop table foo;
+DROP TABLE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond23.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond23.ans b/src/test/feature/Ranger/ans/adminsecond23.ans
new file mode 100644
index 0000000..30a0e21
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond23.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop tablespace mytblspace;
+DROP TABLESPACE
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond24.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond24.ans b/src/test/feature/Ranger/ans/adminsecond24.ans
new file mode 100644
index 0000000..2fc5625
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond24.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+COPY a FROM '/tmp/a.txt';
+COPY 2
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond25.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond25.ans b/src/test/feature/Ranger/ans/adminsecond25.ans
new file mode 100644
index 0000000..08e29ae
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond25.ans
@@ -0,0 +1,13 @@
+-- start_ignore
+-- end_ignore
+COPY a TO STDOUT WITH DELIMITER '|';
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond26.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond26.ans b/src/test/feature/Ranger/ans/adminsecond26.ans
new file mode 100644
index 0000000..ca1d242
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond26.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE EXTERNAL TABLE ext_t ( N_NATIONKEY INTEGER ,N_NAME CHAR(25), N_REGIONKEY INTEGER ,N_COMMENT VARCHAR(152))location ('gpfdist://localhost:7070/nation_error50.tbl')FORMAT 'text' (delimiter '|')SEGMENT REJECT LIMIT 51;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "ext_t" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond27.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond27.ans b/src/test/feature/Ranger/ans/adminsecond27.ans
new file mode 100644
index 0000000..842a8b6
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond27.ans
@@ -0,0 +1,29 @@
+-- start_ignore
+-- end_ignore
+select * from ext_t order by N_NATIONKEY;
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: NOTICE: Found 50 data formatting errors (50 or more input rows). Rejected related input data.
+0|ALGERIA |0| haggle. carefully final deposits detect slyly agai
+1|ARGENTINA |1|al foxes promise slyly according to the regular accounts. bold requests alon
+2|BRAZIL |1|y alongside of the pending deposits. carefully special packages are about the ironic forges. slyly special
+3|CANADA |1|eas hang ironic, silent packages. slyly regular packages are furiously over the tithes. fluffily bold
+4|EGYPT |4|y above the carefully unusual theodolites. final dugouts are quickly across the furiously regular d
+5|ETHIOPIA |0|ven packages wake quickly. regu
+6|FRANCE |3|refully final requests. regular, ironi
+7|GERMANY |3|l platelets. regular accounts x-ray: unusual, regular acco
+8|INDIA |2|ss excuses cajole slyly across the packages. deposits print aroun
+9|INDONESIA |2| slyly express asymptotes. regular deposits haggle slyly. carefully ironic hockey players sleep blithely. carefull
+10|IRAN |4|efully alongside of the slyly final dependencies.
+11|IRAQ |4|nic deposits boost atop the quickly final requests? quickly regula
+12|JAPAN |2|ously. final, express gifts cajole a
+13|JORDAN |4|ic deposits are blithely about the carefully regular pa
+14|KENYA |0| pending excuses haggle furiously deposits. pending, express pinto beans wake fluffily past t
+15|MOROCCO |0|rns. blithely bold courts among the closely regular packages use furiously bold platelets?
+16|MOZAMBIQUE |0|s. ironic, unusual asymptotes wake blithely r
+17|PERU |1|platelets. blithely pending dependencies use fluffily across the even pinto beans. carefully silent accoun
+18|CHINA |2|c dependencies. furiously express notornis sleep slyly regular accounts. ideas sleep. depos
+19|ROMANIA |3|ular asymptotes are about the furious multipliers. express dependencies nag above the ironically ironic account
+20|SAUDI ARABIA |4|ts. silent requests haggle. closely express packages sleep across the blithely
+21|VIETNAM |2|hely enticingly express accounts. even, final
+22|RUSSIA |3| requests against the platelets use never according to the quickly regular pint
+23|UNITED KINGDOM |3|eans boost carefully special requests. accounts are. carefull
+24|UNITED STATES |1|y final packages. slow foxes cajole quickly. quickly silent platelets breach ironic accounts. unusual pinto be
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond28.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond28.ans b/src/test/feature/Ranger/ans/adminsecond28.ans
new file mode 100644
index 0000000..6ccf0e7
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond28.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE WRITABLE EXTERNAL TABLE ext_t2 (i int) LOCATION ('gpfdist://localhost:7070/ranger2.out') FORMAT 'TEXT' ( DELIMITER '|' NULL ' ');
+psql:/tmp/TestHawqRanger_BasicTest.sql:3: ERROR: relation "ext_t2" already exists
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond29.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond29.ans b/src/test/feature/Ranger/ans/adminsecond29.ans
new file mode 100644
index 0000000..3d0587f
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond29.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+insert into ext_t2(i) values(234);
+INSERT 0 1
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond3.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond3.ans b/src/test/feature/Ranger/ans/adminsecond3.ans
new file mode 100644
index 0000000..d0b2353
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond3.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+CREATE OR REPLACE FUNCTION f4() RETURNS TEXT AS $$ plpy.execute("select * from a order by i") $$ LANGUAGE plpythonu VOLATILE;
+CREATE FUNCTION
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/ans/adminsecond30.ans
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/ans/adminsecond30.ans b/src/test/feature/Ranger/ans/adminsecond30.ans
new file mode 100644
index 0000000..278ff6c
--- /dev/null
+++ b/src/test/feature/Ranger/ans/adminsecond30.ans
@@ -0,0 +1,4 @@
+-- start_ignore
+-- end_ignore
+drop EXTERNAL TABLE ext_t;
+DROP EXTERNAL TABLE
[3/6] incubator-hawq git commit: HAWQ-1359. Add policy test for HAWQ
with Ranger enabled.
Posted by hu...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/39/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/39/2.json b/src/test/feature/Ranger/policy/39/2.json
new file mode 100644
index 0000000..f21e2e5
--- /dev/null
+++ b/src/test/feature/Ranger/policy/39/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy39-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest39", "usersuper39"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/4/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/4/1.json b/src/test/feature/Ranger/policy/4/1.json
new file mode 100644
index 0000000..f4fc273
--- /dev/null
+++ b/src/test/feature/Ranger/policy/4/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy4-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest4", "usersuper4"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/4/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/4/2.json b/src/test/feature/Ranger/policy/4/2.json
new file mode 100644
index 0000000..33b40e4
--- /dev/null
+++ b/src/test/feature/Ranger/policy/4/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy4-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest4", "usersuper4"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/4/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/4/3.json b/src/test/feature/Ranger/policy/4/3.json
new file mode 100644
index 0000000..cf5fe38
--- /dev/null
+++ b/src/test/feature/Ranger/policy/4/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy4-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest4", "usersuper4"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["f4"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/40/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/40/1.json b/src/test/feature/Ranger/policy/40/1.json
new file mode 100644
index 0000000..217d364
--- /dev/null
+++ b/src/test/feature/Ranger/policy/40/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy40-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}, {"isAllowed": true, "type": "update"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest40", "usersuper40"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "sequence": {"isExcludes": false, "isRecursive": false, "values": ["myseq"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/40/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/40/2.json b/src/test/feature/Ranger/policy/40/2.json
new file mode 100644
index 0000000..da0446e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/40/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy40-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest40", "usersuper40"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/40/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/40/3.json b/src/test/feature/Ranger/policy/40/3.json
new file mode 100644
index 0000000..ba2d81c
--- /dev/null
+++ b/src/test/feature/Ranger/policy/40/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy40-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest40", "usersuper40"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/41/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/41/1.json b/src/test/feature/Ranger/policy/41/1.json
new file mode 100644
index 0000000..04165a8
--- /dev/null
+++ b/src/test/feature/Ranger/policy/41/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy41-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest41", "usersuper41"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/41/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/41/2.json b/src/test/feature/Ranger/policy/41/2.json
new file mode 100644
index 0000000..4dd264d
--- /dev/null
+++ b/src/test/feature/Ranger/policy/41/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy41-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest41", "usersuper41"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/42/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/42/1.json b/src/test/feature/Ranger/policy/42/1.json
new file mode 100644
index 0000000..475f3e3
--- /dev/null
+++ b/src/test/feature/Ranger/policy/42/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy42-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest42", "usersuper42"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/43/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/43/1.json b/src/test/feature/Ranger/policy/43/1.json
new file mode 100644
index 0000000..a4058cc
--- /dev/null
+++ b/src/test/feature/Ranger/policy/43/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy43-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest43", "usersuper43"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/43/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/43/2.json b/src/test/feature/Ranger/policy/43/2.json
new file mode 100644
index 0000000..c986bb5
--- /dev/null
+++ b/src/test/feature/Ranger/policy/43/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy43-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest43", "usersuper43"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["av"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/43/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/43/3.json b/src/test/feature/Ranger/policy/43/3.json
new file mode 100644
index 0000000..7762ff7
--- /dev/null
+++ b/src/test/feature/Ranger/policy/43/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy43-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest43", "usersuper43"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/44/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/44/1.json b/src/test/feature/Ranger/policy/44/1.json
new file mode 100644
index 0000000..ca69184
--- /dev/null
+++ b/src/test/feature/Ranger/policy/44/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy44-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "update"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest44", "usersuper44"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "sequence": {"isExcludes": false, "isRecursive": false, "values": ["myseq"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/44/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/44/2.json b/src/test/feature/Ranger/policy/44/2.json
new file mode 100644
index 0000000..234dfc5
--- /dev/null
+++ b/src/test/feature/Ranger/policy/44/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy44-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest44", "usersuper44"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/45/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/45/1.json b/src/test/feature/Ranger/policy/45/1.json
new file mode 100644
index 0000000..415d688
--- /dev/null
+++ b/src/test/feature/Ranger/policy/45/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy45-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest45", "usersuper45"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/45/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/45/2.json b/src/test/feature/Ranger/policy/45/2.json
new file mode 100644
index 0000000..bd3589f
--- /dev/null
+++ b/src/test/feature/Ranger/policy/45/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy45-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest45", "usersuper45"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/45/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/45/3.json b/src/test/feature/Ranger/policy/45/3.json
new file mode 100644
index 0000000..cda7594
--- /dev/null
+++ b/src/test/feature/Ranger/policy/45/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy45-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest45", "usersuper45"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["aaa"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/46/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/46/1.json b/src/test/feature/Ranger/policy/46/1.json
new file mode 100644
index 0000000..cf46b1b
--- /dev/null
+++ b/src/test/feature/Ranger/policy/46/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy46-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest46", "usersuper46"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/46/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/46/2.json b/src/test/feature/Ranger/policy/46/2.json
new file mode 100644
index 0000000..c98d724
--- /dev/null
+++ b/src/test/feature/Ranger/policy/46/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy46-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest46", "usersuper46"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/47/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/47/1.json b/src/test/feature/Ranger/policy/47/1.json
new file mode 100644
index 0000000..757b91b
--- /dev/null
+++ b/src/test/feature/Ranger/policy/47/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy47-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest47", "usersuper47"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/47/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/47/2.json b/src/test/feature/Ranger/policy/47/2.json
new file mode 100644
index 0000000..a29b574
--- /dev/null
+++ b/src/test/feature/Ranger/policy/47/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy47-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest47", "usersuper47"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/48/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/48/1.json b/src/test/feature/Ranger/policy/48/1.json
new file mode 100644
index 0000000..8a9ad80
--- /dev/null
+++ b/src/test/feature/Ranger/policy/48/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy48-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest48", "usersuper48"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["scube_accum"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/48/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/48/2.json b/src/test/feature/Ranger/policy/48/2.json
new file mode 100644
index 0000000..e84b8cf
--- /dev/null
+++ b/src/test/feature/Ranger/policy/48/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy48-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest48", "usersuper48"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/48/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/48/3.json b/src/test/feature/Ranger/policy/48/3.json
new file mode 100644
index 0000000..092ef95
--- /dev/null
+++ b/src/test/feature/Ranger/policy/48/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy48-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest48", "usersuper48"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["sql"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/49/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/49/1.json b/src/test/feature/Ranger/policy/49/1.json
new file mode 100644
index 0000000..db4816e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/49/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy49-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest49", "usersuper49"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["scube_accum"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/49/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/49/2.json b/src/test/feature/Ranger/policy/49/2.json
new file mode 100644
index 0000000..f3780a0
--- /dev/null
+++ b/src/test/feature/Ranger/policy/49/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy49-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest49", "usersuper49"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/50/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/50/1.json b/src/test/feature/Ranger/policy/50/1.json
new file mode 100644
index 0000000..328bc30
--- /dev/null
+++ b/src/test/feature/Ranger/policy/50/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy50-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest50", "usersuper50"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/51/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/51/1.json b/src/test/feature/Ranger/policy/51/1.json
new file mode 100644
index 0000000..27dbb27
--- /dev/null
+++ b/src/test/feature/Ranger/policy/51/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy51-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest51", "usersuper51"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/52/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/52/1.json b/src/test/feature/Ranger/policy/52/1.json
new file mode 100644
index 0000000..ecf2d1e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/52/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy52-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest52", "usersuper52"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/53/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/53/1.json b/src/test/feature/Ranger/policy/53/1.json
new file mode 100644
index 0000000..751951e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/53/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy53-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest53", "usersuper53"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/54/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/54/1.json b/src/test/feature/Ranger/policy/54/1.json
new file mode 100644
index 0000000..f5f81d7
--- /dev/null
+++ b/src/test/feature/Ranger/policy/54/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy54-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest54", "usersuper54"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/54/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/54/2.json b/src/test/feature/Ranger/policy/54/2.json
new file mode 100644
index 0000000..6b87dff
--- /dev/null
+++ b/src/test/feature/Ranger/policy/54/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy54-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest54", "usersuper54"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["sql"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/54/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/54/3.json b/src/test/feature/Ranger/policy/54/3.json
new file mode 100644
index 0000000..0d26afe
--- /dev/null
+++ b/src/test/feature/Ranger/policy/54/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy54-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest54", "usersuper54"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["getfoo"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/55/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/55/1.json b/src/test/feature/Ranger/policy/55/1.json
new file mode 100644
index 0000000..cdd54af
--- /dev/null
+++ b/src/test/feature/Ranger/policy/55/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy55-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest55", "usersuper55"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/55/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/55/2.json b/src/test/feature/Ranger/policy/55/2.json
new file mode 100644
index 0000000..c05cc89
--- /dev/null
+++ b/src/test/feature/Ranger/policy/55/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy55-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest55", "usersuper55"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/55/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/55/3.json b/src/test/feature/Ranger/policy/55/3.json
new file mode 100644
index 0000000..8080ffe
--- /dev/null
+++ b/src/test/feature/Ranger/policy/55/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy55-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest55", "usersuper55"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["getfoo"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/56/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/56/1.json b/src/test/feature/Ranger/policy/56/1.json
new file mode 100644
index 0000000..633ac97
--- /dev/null
+++ b/src/test/feature/Ranger/policy/56/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy56-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest56", "usersuper56"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/57/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/57/1.json b/src/test/feature/Ranger/policy/57/1.json
new file mode 100644
index 0000000..ba29b89
--- /dev/null
+++ b/src/test/feature/Ranger/policy/57/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy57-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest57", "usersuper57"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/57/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/57/2.json b/src/test/feature/Ranger/policy/57/2.json
new file mode 100644
index 0000000..4f28390
--- /dev/null
+++ b/src/test/feature/Ranger/policy/57/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy57-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest57", "usersuper57"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/57/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/57/3.json b/src/test/feature/Ranger/policy/57/3.json
new file mode 100644
index 0000000..a7c01ca
--- /dev/null
+++ b/src/test/feature/Ranger/policy/57/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy57-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest57", "usersuper57"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/58/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/58/1.json b/src/test/feature/Ranger/policy/58/1.json
new file mode 100644
index 0000000..dafcae8
--- /dev/null
+++ b/src/test/feature/Ranger/policy/58/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy58-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest58", "usersuper58"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/58/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/58/2.json b/src/test/feature/Ranger/policy/58/2.json
new file mode 100644
index 0000000..2db93a6
--- /dev/null
+++ b/src/test/feature/Ranger/policy/58/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy58-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "insert"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest58", "usersuper58"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/59/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/59/1.json b/src/test/feature/Ranger/policy/59/1.json
new file mode 100644
index 0000000..4027caa
--- /dev/null
+++ b/src/test/feature/Ranger/policy/59/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy59-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest59", "usersuper59"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/60/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/60/1.json b/src/test/feature/Ranger/policy/60/1.json
new file mode 100644
index 0000000..9c4b83b
--- /dev/null
+++ b/src/test/feature/Ranger/policy/60/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy60-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest60", "usersuper60"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/60/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/60/2.json b/src/test/feature/Ranger/policy/60/2.json
new file mode 100644
index 0000000..e303235
--- /dev/null
+++ b/src/test/feature/Ranger/policy/60/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy60-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest60", "usersuper60"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/61/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/61/1.json b/src/test/feature/Ranger/policy/61/1.json
new file mode 100644
index 0000000..b7d0f1d
--- /dev/null
+++ b/src/test/feature/Ranger/policy/61/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy61-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest61", "usersuper61"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/61/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/61/2.json b/src/test/feature/Ranger/policy/61/2.json
new file mode 100644
index 0000000..90a94b7
--- /dev/null
+++ b/src/test/feature/Ranger/policy/61/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy61-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest61", "usersuper61"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/61/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/61/3.json b/src/test/feature/Ranger/policy/61/3.json
new file mode 100644
index 0000000..c821708
--- /dev/null
+++ b/src/test/feature/Ranger/policy/61/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy61-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest61", "usersuper61"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["aaa"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/62/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/62/1.json b/src/test/feature/Ranger/policy/62/1.json
new file mode 100644
index 0000000..cca1e02
--- /dev/null
+++ b/src/test/feature/Ranger/policy/62/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy62-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest62", "usersuper62"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/63/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/63/1.json b/src/test/feature/Ranger/policy/63/1.json
new file mode 100644
index 0000000..e94dd01
--- /dev/null
+++ b/src/test/feature/Ranger/policy/63/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy63-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest63", "usersuper63"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["a"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/63/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/63/2.json b/src/test/feature/Ranger/policy/63/2.json
new file mode 100644
index 0000000..6d024fb
--- /dev/null
+++ b/src/test/feature/Ranger/policy/63/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy63-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest63", "usersuper63"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["aaa"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/63/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/63/3.json b/src/test/feature/Ranger/policy/63/3.json
new file mode 100644
index 0000000..f8a59ce
--- /dev/null
+++ b/src/test/feature/Ranger/policy/63/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy63-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest63", "usersuper63"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["aa"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/63/4.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/63/4.json b/src/test/feature/Ranger/policy/63/4.json
new file mode 100644
index 0000000..c2ad35c
--- /dev/null
+++ b/src/test/feature/Ranger/policy/63/4.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy63-4", "policyItems": [{"accesses": [{"isAllowed": true, "type": "select"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest63", "usersuper63"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["foo"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/64/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/64/1.json b/src/test/feature/Ranger/policy/64/1.json
new file mode 100644
index 0000000..e0940b2
--- /dev/null
+++ b/src/test/feature/Ranger/policy/64/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy64-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest64", "usersuper64"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/65/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/65/1.json b/src/test/feature/Ranger/policy/65/1.json
new file mode 100644
index 0000000..2ef62b1
--- /dev/null
+++ b/src/test/feature/Ranger/policy/65/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy65-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest65", "usersuper65"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/66/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/66/1.json b/src/test/feature/Ranger/policy/66/1.json
new file mode 100644
index 0000000..b52c605
--- /dev/null
+++ b/src/test/feature/Ranger/policy/66/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy66-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest66", "usersuper66"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/67/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/67/1.json b/src/test/feature/Ranger/policy/67/1.json
new file mode 100644
index 0000000..29c772e
--- /dev/null
+++ b/src/test/feature/Ranger/policy/67/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy67-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest67", "usersuper67"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/68/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/68/1.json b/src/test/feature/Ranger/policy/68/1.json
new file mode 100644
index 0000000..8edc1f6
--- /dev/null
+++ b/src/test/feature/Ranger/policy/68/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy68-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest68", "usersuper68"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/69/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/69/1.json b/src/test/feature/Ranger/policy/69/1.json
new file mode 100644
index 0000000..7957a1f
--- /dev/null
+++ b/src/test/feature/Ranger/policy/69/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy69-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest69", "usersuper69"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/7/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/7/1.json b/src/test/feature/Ranger/policy/7/1.json
new file mode 100644
index 0000000..8c69c62
--- /dev/null
+++ b/src/test/feature/Ranger/policy/7/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy7-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest7", "usersuper7"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/7/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/7/2.json b/src/test/feature/Ranger/policy/7/2.json
new file mode 100644
index 0000000..c879269
--- /dev/null
+++ b/src/test/feature/Ranger/policy/7/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy7-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest7", "usersuper7"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["normalize_si"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/7/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/7/3.json b/src/test/feature/Ranger/policy/7/3.json
new file mode 100644
index 0000000..d384993
--- /dev/null
+++ b/src/test/feature/Ranger/policy/7/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy7-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest7", "usersuper7"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["plpgsql"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/70/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/70/1.json b/src/test/feature/Ranger/policy/70/1.json
new file mode 100644
index 0000000..19ca24a
--- /dev/null
+++ b/src/test/feature/Ranger/policy/70/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy70-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest70", "usersuper70"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/71/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/71/1.json b/src/test/feature/Ranger/policy/71/1.json
new file mode 100644
index 0000000..bfcced4
--- /dev/null
+++ b/src/test/feature/Ranger/policy/71/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy71-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest71", "usersuper71"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/8/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/8/1.json b/src/test/feature/Ranger/policy/8/1.json
new file mode 100644
index 0000000..e6c41eb
--- /dev/null
+++ b/src/test/feature/Ranger/policy/8/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy8-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest8", "usersuper8"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/8/2.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/8/2.json b/src/test/feature/Ranger/policy/8/2.json
new file mode 100644
index 0000000..a200f7a
--- /dev/null
+++ b/src/test/feature/Ranger/policy/8/2.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy8-2", "policyItems": [{"accesses": [{"isAllowed": true, "type": "execute"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest8", "usersuper8"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "function": {"isExcludes": false, "isRecursive": false, "values": ["si_lt"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/8/3.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/8/3.json b/src/test/feature/Ranger/policy/8/3.json
new file mode 100644
index 0000000..6316f02
--- /dev/null
+++ b/src/test/feature/Ranger/policy/8/3.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy8-3", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest8", "usersuper8"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "language": {"isExcludes": false, "isRecursive": false, "values": ["plpgsql"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/policy/9/1.json
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/policy/9/1.json b/src/test/feature/Ranger/policy/9/1.json
new file mode 100644
index 0000000..7f08877
--- /dev/null
+++ b/src/test/feature/Ranger/policy/9/1.json
@@ -0,0 +1 @@
+{"allowExceptions": [], "denyExceptions": [], "denyPolicyItems": [], "description": "no description", "isAuditEnabled": true, "isEnabled": true, "name": "policy9-1", "policyItems": [{"accesses": [{"isAllowed": true, "type": "usage-schema"}, {"isAllowed": true, "type": "create"}], "conditions": [], "delegateAdmin": true, "groups": null, "users": ["usertest9", "usersuper9"]}], "resources": {"database": {"isExcludes": false, "isRecursive": false, "values": ["hawq_feature_test_db"]}, "schema": {"isExcludes": false, "isRecursive": false, "values": ["public"]}, "table": {"isExcludes": false, "isRecursive": false, "values": ["*"]}}, "service": "hawq", "version": 1}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/rangerpolicy.py
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/rangerpolicy.py b/src/test/feature/Ranger/rangerpolicy.py
new file mode 100644
index 0000000..035ed14
--- /dev/null
+++ b/src/test/feature/Ranger/rangerpolicy.py
@@ -0,0 +1,100 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import sys
+import urllib2, base64
+import json
+
+from optparse import OptionParser
+from rangerrest import RangerRestHelper
+
+
+def foo_callback(option, opt, value, parser):
+ setattr(parser.values, option.dest, value.split(','))
+
+def option_parser():
+ '''option parser'''
+ parser = OptionParser()
+ parser.remove_option('-h')
+ parser.add_option('-?', '--help', action='help')
+ parser.add_option('-h', '--host', dest="host", help='host of the ranger server', \
+ default='localhost')
+ parser.add_option('-p', '--port', dest="port", \
+ help='port of the ranger server', type='int', default=6080)
+ parser.add_option('-U', '--rangeruser', dest="rangerusername", default='admin', \
+ help='ranger username')
+ parser.add_option('-w', '--rangerpassword', dest="rangerpassword", \
+ default='admin', help='ranger password')
+ parser.add_option('-d', '--detelepolicy', dest="deletedpolicyname",\
+ default= '', help='delete a policy in ranger')
+ parser.add_option('-a', '--addpolicy', dest="newpolicyfilename", \
+ default = '', help='add a policy in ranger by json file')
+ return parser
+
+def create_policy(policy_json_file_name, rangerhelper):
+ if policy_json_file_name != '':
+ jsonfile = open(policy_json_file_name, "r")
+ json_decode=json.load(jsonfile)
+ policyname = json_decode['name']
+ #print json_decode
+ response, is_success = rangerhelper.create_policy(json.dumps(json_decode))
+
+ # is there is a duplicate policy error, we try to update policy.
+ if is_success == False:
+ #get duplicate policy name
+ policy_start_pos = response.find("policy-name=[")
+ response = response[policy_start_pos+13:]
+ policy_end_pos = response.find("], service=[")
+ dup_policy_name = response[0:policy_end_pos]
+
+ #get dupulicate policy and add privilege item.
+ service_name = 'hawq'
+ print dup_policy_name;
+ response, is_success = rangerhelper.get_policy(service_name, dup_policy_name);
+ response_dict = json.load(response)
+ for new_policy_item in json_decode['policyItems']:
+ response_dict["policyItems"].append(new_policy_item)
+ rangerhelper.update_policy(service_name, dup_policy_name, \
+ json.dumps(response_dict));
+ return policyname
+
+def delete_policy(delete_policy_name, rangerhelper):
+ rangerhelper.delete_policy("hawq", delete_policy_name);
+
+
+if __name__ == '__main__':
+ #parse argument
+ parser = option_parser()
+ (options, args) = parser.parse_args()
+ rangeruser = options.rangerusername
+ rangerpasswd= options.rangerpassword
+ host = options.host
+ port = str(options.port)
+ new_policy_json_file_name = options.newpolicyfilename
+ delete_policy_name = options.deletedpolicyname
+
+ #init rangerresthelper
+ helper = RangerRestHelper(host, port, rangeruser, rangerpasswd);
+
+ if new_policy_json_file_name != "":
+ policyname = create_policy(new_policy_json_file_name, helper)
+ print "policy {} created".format(policyname)
+
+ if delete_policy_name != "":
+ delete_policy(delete_policy_name, helper)
+ print "policy {} deleted".format(delete_policy_name)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/rangerrest.py
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/rangerrest.py b/src/test/feature/Ranger/rangerrest.py
new file mode 100644
index 0000000..851cdd8
--- /dev/null
+++ b/src/test/feature/Ranger/rangerrest.py
@@ -0,0 +1,86 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import sys
+import urllib2, base64
+import json
+
+class RangerRestHelper(object):
+ def __init__(self, host, port, user, passwd):
+ self.host = host
+ self.port = port
+ self.user = user
+ self.passwd= passwd
+
+ def _send_request(self, url, method, jsondata=''):
+ try:
+ request = urllib2.Request(url)
+ if method != "DELETE":
+ request.add_header("Content-Type",'application/json')
+ request.add_header("Accept", 'application/json')
+ #request.add_header("Content-Type",'application/json')
+ base64string = base64.b64encode('%s:%s' % (self.user, self.passwd))
+ request.add_header("Authorization", "Basic %s" % base64string)
+ request.get_method = lambda: method
+ if jsondata != '':
+ request.add_data(jsondata)
+ ret = urllib2.urlopen(request)
+ return ret, True
+ except urllib2.HTTPError, e:
+ if e.code == 400 and e.reason == "Bad Request":
+ error_message = e.read()
+ print error_message
+ return error_message, False
+
+ def get_policy(self, service_name, policy_name):
+ url = 'http://' + self.host + ':' + self.port + '/service/public/v2/api/service/' + \
+ service_name +'/policy/' + policy_name
+ return self._send_request(url, 'GET')
+
+ def update_policy(self, service_name, policy_name, policy_info):
+ url = 'http://' + self.host + ':' + self.port + '/service/public/v2/api/service/' + \
+ service_name +'/policy/' + policy_name
+ return self._send_request(url, 'PUT', policy_info)
+
+ def create_policy(self, policy_info):
+ url = 'http://' + self.host + ':' + self.port + '/service/public/v2/api/policy'
+ return self._send_request(url, 'POST', policy_info)
+
+ def delete_policy(self, service_name, policy_name):
+
+ url = 'http://' + self.host + ':' + self.port + \
+ '/service/public/v2/api/policy?servicename=' + \
+ service_name +'&policyname=' + policy_name
+ return self._send_request(url, 'DELETE')
+
+ def get_user(self):
+ url = 'http://' + self.host + ':' + self.port + '/service/users'
+ return self._send_request(url, 'GET')
+
+ # create secure user may not work currently
+ def create_secure_user(self, user_info):
+ url = 'http://' + self.host+ ':' + self.port + '/service/xusers/secure/users'
+ return self._send_request(url, 'POST', user_info)
+
+ def create_user_without_login(self, user_info):
+ url = 'http://' + self.host+ ':' + self.port + '/service/xusers/users'
+ return self._send_request(url, 'POST', user_info)
+
+ def delete_user(self, user):
+ url = 'http://' + self.host+ ':' + self.port + '/service/xusers/users'
+ return self._send_request(url, 'DELETE')
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/rangeruser.py
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/rangeruser.py b/src/test/feature/Ranger/rangeruser.py
new file mode 100644
index 0000000..b1970a1
--- /dev/null
+++ b/src/test/feature/Ranger/rangeruser.py
@@ -0,0 +1,117 @@
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import sys
+import urllib2, base64
+import json
+
+from optparse import OptionParser
+from rangerrest import RangerRestHelper
+
+
+def foo_callback(option, opt, value, parser):
+ setattr(parser.values, option.dest, value.split(','))
+
+def option_parser():
+ '''option parser'''
+ parser = OptionParser()
+ parser.remove_option('-h')
+ parser.add_option('-?', '--help', action='help')
+ parser.add_option('-h', '--host', dest="host", help='host of the ranger server', \
+ default='localhost')
+ parser.add_option('-p', '--port', dest="port", \
+ help='port of the ranger server', type='int', default=6080)
+ parser.add_option('-U', '--rangeruser', dest="rangerusername", default='admin', \
+ help='ranger username')
+ parser.add_option('-w', '--rangerpassword', dest="rangerpassword", \
+ default='admin', help='ranger password')
+ parser.add_option('-f', '--full', action="store_true", dest="fullprivilege", \
+ default=False, help='also add full privilege for user')
+ parser.add_option('-u', '--user', dest="users", type='string',\
+ action='callback', callback=foo_callback, \
+ help='the ranger user list to be added')
+ parser.add_option('-d', '--deteleuser', dest="deleteduserame",\
+ type='string', action='callback', \
+ callback=foo_callback, help='delete a user in ranger')
+ return parser
+
+
+def delete_user(uname, rangerhelper):
+ rangerhelper.delete_user_without_login(uname);
+
+def add_user(uname, rangerhelper):
+ userSuper = json.dumps({ "name":uname, "firstName":"super", \
+ "lastName": "", "loginId": uname, \
+ "emailAddress" : None, "description" : uname\
+ , "password" : uname, "groupIdList":[2,12], \
+ "status":1, "isVisible":1, "userRoleList": \
+ ["ROLE_SYS_ADMIN"], "userSource": 1 })
+ rangerhelper.create_user_without_login(userSuper);
+
+def add_full_privilege_for_user(uname, policy_names, rangerhelper):
+
+ service_name = 'hawq'
+ for policy_name in policy_names:
+ response, is_success = rangerhelper.get_policy(service_name, policy_name);
+ response_dict = json.load(response)
+ for pitem in response_dict["policyItems"]:
+ pitem['users'].append(uname)
+ rangerhelper.update_policy(service_name, policy_name, \
+ json.dumps(response_dict));
+ return True
+
+if __name__ == '__main__':
+ parser = option_parser()
+
+ (options, args) = parser.parse_args()
+
+
+ rangeruser = options.rangerusername
+ rangerpasswd= options.rangerpassword
+ host = options.host
+ port = str(options.port)
+ add_full_privilege = options.fullprivilege
+
+ schema_policy_name = urllib2.quote('all - database, schema, function')
+ table_policy_name = urllib2.quote('all - database, schema, table')
+ language_policy_name = urllib2.quote('all - database, language')
+ protocol_policy_name = urllib2.quote('all - protocol')
+ sequence_policy_name = urllib2.quote('all - database, schema, sequence')
+ tablespae_policy_name = urllib2.quote('all - tablespace')
+ policy_names = [schema_policy_name, table_policy_name, \
+ language_policy_name, protocol_policy_name, \
+ sequence_policy_name, tablespae_policy_name]
+
+ helper = RangerRestHelper(host, port, rangeruser, rangerpasswd);
+ #unames = ["super", "superuser"]
+ unames = options.users
+ deletedunames = options.deleteduserame
+ if deletedunames:
+ for user in deletedunames:
+ delete_user(user, helper)
+ print 'user {} is added'.format(user)
+ elif add_full_privilege:
+ for user in unames:
+ add_user(user, helper)
+ add_full_privilege_for_user(user, policy_names, helper)
+ print 'user {} complete'.format(user)
+ else:
+ for user in unames:
+ add_user(user, helper)
+ print 'user {} is added'.format(user)
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/1.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/1.sql b/src/test/feature/Ranger/sql/admin/1.sql
new file mode 100644
index 0000000..a508bec
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/1.sql
@@ -0,0 +1,2 @@
+create table a(i int);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/10.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/10.sql b/src/test/feature/Ranger/sql/admin/10.sql
new file mode 100644
index 0000000..ab831f1
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/10.sql
@@ -0,0 +1,2 @@
+CREATE OR REPLACE FUNCTION si_same(text, text) RETURNS int AS $$ BEGIN IF normalize_si($1) < normalize_si($2) THEN RETURN -1; END IF; END; $$ LANGUAGE 'plpgsql' IMMUTABLE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/11.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/11.sql b/src/test/feature/Ranger/sql/admin/11.sql
new file mode 100644
index 0000000..490fd37
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/11.sql
@@ -0,0 +1,2 @@
+CREATE OPERATOR CLASS sva_special_ops FOR TYPE text USING btree AS OPERATOR 1 <#, FUNCTION 1 si_same(text, text);
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/12.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/12.sql b/src/test/feature/Ranger/sql/admin/12.sql
new file mode 100644
index 0000000..8c5798f
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/12.sql
@@ -0,0 +1,2 @@
+drop OPERATOR CLASS sva_special_ops USING btree;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/13.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/13.sql b/src/test/feature/Ranger/sql/admin/13.sql
new file mode 100644
index 0000000..2e0c9fe
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/13.sql
@@ -0,0 +1,2 @@
+drop OPERATOR <# (text,text) CASCADE;
+
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/12089267/src/test/feature/Ranger/sql/admin/14.sql
----------------------------------------------------------------------
diff --git a/src/test/feature/Ranger/sql/admin/14.sql b/src/test/feature/Ranger/sql/admin/14.sql
new file mode 100644
index 0000000..6218b4a
--- /dev/null
+++ b/src/test/feature/Ranger/sql/admin/14.sql
@@ -0,0 +1,2 @@
+drop FUNCTION si_same(text, text);
+