Commit 519314f0 by Madhan Neethiraj

ATLAS-2536: fix NPE in Hive hook

parent e86fc944
......@@ -618,9 +618,13 @@ public abstract class BaseHiveEvent {
protected String getQualifiedName(BaseColumnInfo column) {
String dbName = column.getTabAlias().getTable().getDbName();
String tableName = column.getTabAlias().getTable().getTableName();
String colName = column.getColumn().getName();
String colName = column.getColumn() != null ? column.getColumn().getName() : null;
return getQualifiedName(dbName, tableName, colName);
if (colName == null) {
return (dbName + QNAME_SEP_ENTITY_NAME + tableName + QNAME_SEP_CLUSTER_NAME).toLowerCase() + getClusterName();
} else {
return (dbName + QNAME_SEP_ENTITY_NAME + tableName + QNAME_SEP_ENTITY_NAME + colName + QNAME_SEP_CLUSTER_NAME).toLowerCase() + getClusterName();
}
}
protected String getQualifiedName(String dbName, String tableName, String colName) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment