Changes in Patchset2 Fixed issues found during review.
Most of the changes are related to disbling this change for unique indexes. When a unique index is found, they alone are disabled during the load. Other indexes are online and are handled as described below. Once the base table and regular indexes have been loaded, unique indexes are loaded from scratch using a new command "populate all unique indexes on <tab-name>". A simlilar command "alter table <tab-name> disable all unique indexes" is used to disable all unique indexes on a table at the start of load.
Cqd change setting allow_incompatible_assignment is unrelated and fixes an issue related to loading timestamp types from hive.
Odb change gets rid of minor warnings.
Thanks to all three reviewers for their helpful comments. -----------------------------------
Adding support for incremental index maintenance during bulk load.
Previously when bulk loading into a table with indexes, the indexes are first disabled, base table is loaded and then the indexes are populated from scratch one by one. This could take a long time when the table has significant data prior to the load.
Using a design by Hans this change allows indexes to be loaded in the same query tree as the base table. The query tree looks like this
This design and change set allows multiple indexes to be on the same tree. Only one index is shown here for simplicity. LOAD CLEANUP and LOAD COMPLETE statements also now perform these tasks for the base table along with all enabled indexes
This change is enabled by default. If a table has indexes it will be incrementally maintained during bulk load. The WITH NO POPULATE INDEX option has been removed A new option WITH REBUILD INDEXES has been added. With this option we get the old behaviour of disabling all indexes before load into table and then populate all of them from scratch.