[ https://issues.apache.org/jira/browse/SENTRY-328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14093091#comment-14093091
]
Tuong Truong commented on SENTRY-328:
-------------------------------------
Looks like I did not run test on this patch. It seems DN is some how generating bad SQLs
for Apache. I will need more time to track down if this is DN/JDO regression issue or Derby
issue. The complain is that the exists subquery returns multiple columns. However, Derby
SQL reference seems to allow for this.
testGrantRevokePrivilegeWithGrantOption(org.apache.sentry.provider.db.service.persistent.TestSentryStore)
Time elapsed: 1.067 sec <<< ERROR!
javax.jdo.JDODataStoreException: Iteration request failed : SELECT 'org.apache.sentry.provider.db.service.model.MSentryPrivilege'
AS NUCLEUS_TYPE,A1.URI,A1."ACTION",A1.CREATE_TIME,A1.DB_NAME,A1.WITH_GRANT_OPTION,A1.GRANTOR_PRINCIPAL,A1.PRIVILEGE_SCOPE,A1."SERVER_NAME",A1."TABLE_NAME",A1.DB_PRIVILEGE_ID,A0.ROLE_ID
FROM SENTRY_ROLE_DB_PRIVILEGE_MAP A0 INNER JOIN SENTRY_DB_PRIVILEGE A1 ON A0.DB_PRIVILEGE_ID
= A1.DB_PRIVILEGE_ID WHERE EXISTS (SELECT 'org.apache.sentry.provider.db.service.model.MSentryRole'
AS NUCLEUS_TYPE,A0_SUB.ROLE_ID AS DN_DATASTOREID FROM SENTRY_ROLE A0_SUB WHERE A0_SUB.ROLE_NAME
= ? AND A0.ROLE_ID = A0_SUB.ROLE_ID)
> Need to update DataNucleus version to support proper SQL generation for DB2
> ---------------------------------------------------------------------------
>
> Key: SENTRY-328
> URL: https://issues.apache.org/jira/browse/SENTRY-328
> Project: Sentry
> Issue Type: Bug
> Affects Versions: 1.4.0
> Reporter: Tuong Truong
> Assignee: Tuong Truong
> Labels: DB2
> Fix For: 1.5.0
>
> Attachments: SENTRY-328.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> DatataNucleus RDBMS jar has defect that causes it to generate improper SQL for DB2 backend
for certain type of query. This was found in Jira Hive-6136. The fix was integrated into
datanucleus-core 3.2.12, datanucleus-rdbms 3.2.11.
> We'd like to Sentry to use this version to ensure proper DB2 support.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
|