[ https://issues.apache.org/jira/browse/SENTRY-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16484235#comment-16484235 ]
Na Li commented on SENTRY-2066: ------------------------------- SENTRY-1209 introduces the bug in HiveAuthzBindingHook.java, and under some situations, the database name is not set in alter table command. This jira fixes this issue from SENTRY-1209 > DB name is not set for AlterTable > ---------------------------------- > > Key: SENTRY-2066 > URL: https://issues.apache.org/jira/browse/SENTRY-2066 > Project: Sentry > Issue Type: Bug > Components: Sentry > Affects Versions: 2.0.0 > Reporter: Na Li > Assignee: Na Li > Priority: Critical > Labels: 2.0 > Fix For: 2.0.0 > > Attachments: SENTRY-2066.001.patch, SENTRY-2066.002.patch, > SENTRY-2066.003.patch > > > SENTRY-1087 introduced a regression: the database name is not set in alter > table column command. > SENTRY-1087 added a new case below, and it causes the currDB not set because > its children are "TOK_TABNAME" and "TOK_ALTERTABLE_RENAMECOL" NONE IS > "TOK_ALTERTABLE_SERIALIZER" > {code} > case HiveParser.TOK_ALTERTABLE: > > for (Node childNode : ast.getChildren()) { > ASTNode childASTNode = (ASTNode) childNode; > if > ("TOK_ALTERTABLE_SERIALIZER".equals(childASTNode.getText())) { > ASTNode serdeNode = (ASTNode) childASTNode.getChild(0); > String serdeClassName = > BaseSemanticAnalyzer.unescapeSQLString(serdeNode.getText()); > setSerdeURI(serdeClassName); > currDB = getCanonicalDb(); > } > } > break; > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)