Github user sureshsubbiah commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/74#discussion_r38950572
--- Diff: core/sql/optimizer/BindRelExpr.cpp ---
@@ -1569,12 +1569,11 @@ NATable *BindWA::getNATable(CorrName& corrName,
((QualifiedName&)(table->getTableName())).setIsVolatile(TRUE);
}
- // For now, do not allow access through the Trafodion external name
created for
- // the HIVE object unless the inDDL flag is set. inDDL is set for drop
- // table and SHOWDDL statements.
- // TDB - may want to merge the Trafodion version with the HIVE version.
- // TDB - similar operation may be needed for external HBase tables
- if ((table) && (table->isExternalTable() && (! bindWA->inDDL())))
+ // For now, don't allow access through the Trafodion external name
created for
+ // native HIVE or HBASE objects unless the allowExternalTables flag is
set.
+ // allowExternalTables is set for drop table and SHOWDDL statements.
+ // TDB - may want to merge the Trafodion version with the native version.
+ if ((table) && (table->isExternalTable() && (!
bindWA->allowExternalTables())))
--- End diff --
I have forgotten why we thought this restriction is necessary.
A user registers a Hive/HBase table with us but is not able to use the
table with the registered name in DML. Will UPDATE STATs will be on the
original name too (and update stats code will find out registered name and use
it for Table_uid?). This was the registration concept is almost like an
internal implementation idea, at some point could even be done by some utility
program for all existing Hive/hBase tables, and the user need not be aware of
it?
I am struggling with a user would want to register a table, if they cannot
use it by that name.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---