Data Pump Import Job is Hanging at SCHEMA_EXPORT/STATISTICS/MARKER

In 12.1.0.2 data pump impdp job is hanging like below:

...
..
.
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER

Query the database, the following sql is running :

insert into sys.spd_scratch_tab l (n1)           
   select to_number(c5) 
   from  sys."_user_stat_varray" d 
   where type = 'D' 
   and not exists  (select null 
                      from  sys."_user_stat_varray" do      
                     where do.type = 'O' 
                       and do.c5 = d.c5
                       and not exists  (select null 
                                         from sys.spd_scratch_tab l            
                                        where l.c1 = do.c1 
                                        and l.c2 = do.c2)
                   )

CAUSE

It is a known issue in 12.1.0.2

SOLUTION

1) Upgrade to 12.2.0.1 or higher.

OR

2) Download and apply the Generic Platform Patch:20345554.

OR

3) Workaround is to exclude statistics during the import using EXCLUDE=STATISTICS .