Shishr Prakash created SENTRY-2439:
--------------------------------------
Summary: "is not match table meta grammar error" with sentry-1.7
Key: SENTRY-2439
URL: https://issues.apache.org/jira/browse/SENTRY-2439
Project: Sentry
Issue Type: Bug
Components: Sentry
Affects Versions: 1.7.0
Reporter: Shishr Prakash
[What happened]
After enabling sentry I am getting below error with DDLs like DROP table .
similar to sentry bug-1845.
[1] https://issues.apache.org/jira/browse/SENTRY-1845
====Error ===
2 rows selected (0.171 seconds)
0: jdbc:hive2://maprtest03:10000> DROP TABLE project_dev_out_hive;
Error: Error while compiling statement: FAILED: HiveAuthzPluginException class
org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthzPluginException:
this command DROP TABLE project_dev_out_hive is not match table meta grammar
(state=42000,code=40000)
======
It is not the same issue, but a similar issue for DROP TABLE command. The
Sentry regex pattern for DROP TABLE command does not seem to be supporting
backtick.
String DROP_TABLE_REGEX = "^DROP\s+" + "TABLE\s+" + "(IF\s+EXISTS\s+)?" +
"([A-Za-z0-9._]+)";
Looks like it is not fixed in the latest version as well (the same pattern is
used in the master branch as well). Hive seems to be supporting this syntax.
## Steps to Reproduce
Try dropping hive table with backticks as below
DROP TABLE `project_dev_out_hive`;
### What you expected to happen
Sentry should understand backticks and it should work for every command.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)