phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ankitsinghal <...@git.apache.org>
Subject [GitHub] phoenix pull request #283: PHOENIX-672 Add GRANT and REVOKE commands using H...
Date Wed, 22 Nov 2017 06:52:03 GMT
Github user ankitsinghal commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/283#discussion_r152480973
  
    --- Diff: phoenix-core/src/test/java/org/apache/phoenix/parse/QueryParserTest.java ---
    @@ -66,6 +68,46 @@ private void parseQueryThatShouldFail(String sql) throws Exception
{
             }
         }
     
    +    @Test
    +    public void testParseGrantQuery() throws Exception {
    +
    +        String sql0 = "GRANT 'RX' ON SYSTEM.\"SEQUENCE\" TO 'user'";
    +        parseQuery(sql0);
    +        String sql1 = "GRANT 'RWXCA' ON TABLE some_table0 TO 'user0'";
    +        parseQuery(sql1);
    +        String sql2 = "GRANT 'RWX' ON some_table1 TO 'user1'";
    +        parseQuery(sql2);
    +        String sql3 = "GRANT 'CA' ON SCHEMA some_schema2 TO 'user2'";
    +        parseQuery(sql3);
    +        String sql4 = "GRANT 'RXW' ON some_table3 TO GROUP 'group3'";
    +        parseQuery(sql4);
    +        String sql5 = "GRANT 'RXW' ON \"some_schema5\".\"some_table5\" TO GROUP 'group5'";
    +        parseQuery(sql5);
    +        String sql6 = "GRANT 'RWA' TO 'user6'";
    +        parseQuery(sql6);
    +        String sql7 = "GRANT 'A' TO GROUP 'group7'";
    +        parseQuery(sql7);
    --- End diff --
    
    Do we have validation on permission type like fail when permission is other than 'RWXCA'
at parsing side?


---

Mime
View raw message