Na Li created SENTRY-2066:
-----------------------------
Summary: 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
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
(v6.4.14#64029)