SYMPTOM:
`Temporary view` intermediate table type VLDB settings is not applied in Strategy when using Warehouse Partition Mapping Table.
STEPS TO REPRODUCE:
select a11.PBTNAME PBTNAME
from PMT_INVENTORY a11
group by a11.PBTNAME
[BEGIN PARTITION SQL, all 3 branches are showed and only one will be executed]
[1st BRANCH]
CREATE TEMP TABLE ZZPO00(
MONTH_ID INTEGER,
COUNTRY_ID SMALLINT,
WJXBFS1 FLOAT)
DISTRIBUTE ON RANDOM
[2nd BRANCH]
CREATE TEMP TABLE ZZPO00 as
select a11.MONTH_ID MONTH_ID,
a12.COUNTRY_ID COUNTRY_ID,
sum(a11.EOH_QTY) WJXBFS1
from {|Partition_Base_Table|} a11
cross join LU_COUNTRY a12
group by a11.MONTH_ID,
a12.COUNTRY_ID
[3rd BRANCH]
CREATE TEMP TABLE ZZPO00 as
select a11.MONTH_ID MONTH_ID,
a12.COUNTRY_ID COUNTRY_ID,
sum(a11.EOH_QTY) WJXBFS1
from {|Partition_Base_Table|} a11
cross join LU_COUNTRY a12
group by a11.MONTH_ID,
a12.COUNTRY_ID
[END PARTITION SQL]
CREATE TEMP TABLE ZZMB01 as
select pc11.COUNTRY_ID COUNTRY_ID,
max(pc11.MONTH_ID) WJXBFS1
from ZZPO00 pc11
group by pc11.COUNTRY_ID
select pa11.COUNTRY_ID COUNTRY_ID,
max(a13.COUNTRY_NAME) CUST_COUNTRY_DESC0,
max(pa11.WJXBFS1) WJXBFS1
from ZZPO00 pa11
join ZZMB01 pa12
on (pa11.COUNTRY_ID = pa12.COUNTRY_ID and
pa11.MONTH_ID = pa12.WJXBFS1)
join LU_COUNTRY a13
on (pa11.COUNTRY_ID = a13.COUNTRY_ID)
group by pa11.COUNTRY_ID
[Analytical engine calculation steps:
1. Perform cross-tabbing
CAUSE:
This is working as designed. The logic for reporting on warehouse partition mapping tables includes scenarios not supported by temporary views which forces the use of the fallback intermediate table type.