sentry-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Na Li (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SENTRY-2066) DB name is not set for AlterTable
Date Tue, 21 Nov 2017 03:29:00 GMT

     [ https://issues.apache.org/jira/browse/SENTRY-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Na Li updated SENTRY-2066:
--------------------------
    Attachment: SENTRY-2066.001.patch

> 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
>         Attachments: SENTRY-2066.001.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
(v6.4.14#64029)

Mime
View raw message