> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java,
> >  line 758
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053060#file1053060line758>
> >
> >     how about just use columnName here?

OK, I will change it. Thanks


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java,
> >  line 123
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053059#file1053059line123>
> >
> >     add a space after // ?

I will change it. thanks


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java,
> >  line 763
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053060#file1053060line763>
> >
> >     remove ; ?

Because Colunmn level privilege will not any WriteEntity. So it doesn't need to 
check. I have removed it. Thanks


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java,
> >  line 53
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053059#file1053059line53>
> >
> >     How about removing the default constructor?

I will change it. Thanks


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java,
> >  line 95
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053059#file1053059line95>
> >
> >     This is also same with the parent one and can be removed. Please 
> > correct me if I am wrong.

I have change this code. Thanks for your comment.


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java,
> >  line 51
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053059#file1053059line51>
> >
> >     stmtOperation maynot be initialized when we call getStmtOperation() 
> > (eg. in line 129). How about setting it to null in construcor?

I will move the setting in the construct function. Thanks


> On 八月 27, 2015, 5:14 a.m., Li Li wrote:
> > sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java,
> >  line 56
> > <https://reviews.apache.org/r/37794/diff/1/?file=1053059#file1053059line56>
> >
> >     Since setHiveAuthzBinding and setSubject should only be called once, 
> > how about moving them in the constructor method, and remove 
> > setHiveAuthzBinding and setSubject methods?
> >     Besides, it maybe better to verify hiveAuthzBing and subject are not 
> > null. eg. If subject is null, it will throw runtime exception in line 129: 
> > getSubject().getName().

Good advice. I will change it. Thanks


- shen


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37794/#review96637
-----------------------------------------------------------


On 八月 27, 2015, 5:15 a.m., shen guoquan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37794/
> -----------------------------------------------------------
> 
> (Updated 八月 27, 2015, 5:15 a.m.)
> 
> 
> Review request for sentry, Colin Ma, Dapeng Sun, and Sravya Tirukkovalur.
> 
> 
> Repository: sentry
> 
> 
> Description
> -------
> 
> grant select(s) on table test_tb to role test_role;
> 
> show columns in test_tb;
> 
> Error: Error while compiling statement: FAILED: SemanticException No valid 
> privileges
>  Required privileges for this query: 
> Server=server1->Db=test_db->Table=test_tb->action=insert;Server=server1->Db=test_db->Table=test_tb->action=select;
>  (state=42000,code=40000)
> 
> It should show s column
> 
> 
> Diffs
> -----
> 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/hadoop/hive/ql/exec/SentryFilterDDLTask.java
>  PRE-CREATION 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/HiveAuthzBindingHook.java
>  ddfb222 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivileges.java
>  8cd82ef 
>   
> sentry-binding/sentry-binding-hive/src/main/java/org/apache/sentry/binding/hive/authz/HiveAuthzPrivilegesMap.java
>  0291b6c 
>   
> sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestColumnEndToEnd.java
>  159b9d9 
> 
> Diff: https://reviews.apache.org/r/37794/diff/
> 
> 
> Testing
> -------
> 
> Run local unit case
> 
> 
> Thanks,
> 
> shen guoquan
> 
>

Reply via email to