[TRAFODION-2584] Add support to register hive objects in traf metadata Syntax: register hive table/view [if not exists] <object-name> [cascade] unregister hive table/view [if exists] <object-name> [cascade] cascade option: register/unregister all underlying objects that are part of the specified view
update statistics, grant/revoke, traf views or external table creation on hive objects will automatically and internally register those objects in trafodion metadata.
invoke/showddl will show if this object is registered and whether that registration was internal or explicit.
Get command extensions: get hive registered tables/view/objects in catalog trafodion; get hive external tables in catalog trafodion;
Cleanup command extensions: cleanup metadata command will clean up inconsistent hive objects (underlying hive object is missing but object is registered or an external table exists)
cleanup [hive table | hive view] on <object-name>;
Existing hive objects that had implicit or explicit external tables created prior to this checkin will have no change in behavior. ObjectUID of those external tables will continue to be used for relevant operations. One can drop those external tables and explicitly register them, or a subsequent operation(upd stats, grant, etc) that needs objectUID will automatically register them.
minor changes based on review comments of previous checkin
get all objects command on hive metadata no longer fails. get views on objects return 3-part name that could be used to differentiate between a traf and hive view.
TRAFODION-2492 Support for native hive views, plus few more changes -- added support for native hive views created externally. These views can be accessed in a traf sql query.
There are some restrictions as listed below: -- privileges support has not yet been added. That will be done, as needed, in the next checkin. -- usage info for tables contained in a native hive view is not maintained. -- native hive views cannot be inserted/updated/deleted -- cannot update stats on a native hive view
-- support for GET statements to retrieve hive data get tables/views/objects in schema hive.sch; -- this will return all tables/views in specified schema(hive database) get tables/views/objects in catalog hive; -- this will return all tables/views in hive get schemas in catalog hive; -- this will return all schemas(databases) that exist in hive
-- GET statements to retrieve hive data now supports optional MATCH clause. This can be used to filter results.
-- showddl will show if an external table on hive was created implicitly for internal usage (upd stats, privileges, views) or explicitly by user. Internal creation of external table now use 'create implicit external table' syntax and that info is stored in metadata.
-- drop external table will drop that table even if underlying hive table is missing. Currently it returns an error.
-- at runtime, accessing a missing hive table now returns a better error message instead of an internal "data mod check failed" message.
-- regress/tools/runallsb has 2 new options: -basetests (this will run core,compGeneral,executor,seabase,hive) -othertests (this will run all other tests suites)
-- optimizer/NATable.cpp was incorrectly indented by some checkin from a few days back. TABs were used instead of spaces which caused code to become all crooked. That has been fixed.
-- regress/hive/TEST007 has been updated with additional hive view tests