> On July 29, 2014, 11:45 p.m., Sravya Tirukkovalur wrote: > > Thanks for the patch Xiaomeng! LGTM, just one question: Wonder how is null > > value of Boolean translated to a char(1) by jdo? > > Xiaomeng Huang wrote: > It's a good question. In our design, grantOption couldn't be null in db, > it must be Y/N, and I restrain it NOT NULL in dbs. > We store the privilege to db just via grant command. And grant command > will give grantOption(Boolean) yes(with grant option) or no(no grant option). > And grantOption in MSentryPrivilege is initilized as false. > We just give grantOption in MSentryPrivilege null when Hive execute > revoke command. If we got null in SentryStore, we will remove two privileges > of grantOption=Y and N in db. And the revoke command will not store any items > to db.
Ah, makes sense. Thanks! - Sravya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23786/#review49050 ----------------------------------------------------------- On July 29, 2014, 2:38 a.m., Xiaomeng Huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23786/ > ----------------------------------------------------------- > > (Updated July 29, 2014, 2:38 a.m.) > > > Review request for sentry, Arun Suresh, Prasad Mujumdar, and Sravya > Tirukkovalur. > > > Repository: sentry > > > Description > ------- > > This is database design and implement to support "with grant option". > Add a field grantOption(int) to table SENTRY_DB_PRIVILEGE. > And modify the table SENTRY_DB_PRIVILEGE from a single index {privilegeName} > to a composite index with member {privilegeName, grantOption} > > > Diffs > ----- > > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/MSentryPrivilege.java > f8491db > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/model/package.jdo > 945227e > sentry-provider/sentry-provider-db/src/main/resources/sentry-db2-1.4.0.sql > f2a62d2 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-derby-1.4.0.sql > f2a62d2 > > sentry-provider/sentry-provider-db/src/main/resources/sentry-mysql-1.4.0.sql > 70f4dbb > > sentry-provider/sentry-provider-db/src/main/resources/sentry-oracle-1.4.0.sql > 363590e > > sentry-provider/sentry-provider-db/src/main/resources/sentry-postgres-1.4.0.sql > 5dfae03 > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > 7637376 > > Diff: https://reviews.apache.org/r/23786/diff/ > > > Testing > ------- > > > Thanks, > > Xiaomeng Huang > >
