TESTING PARTITIONING WITH HDFS CACHING hdfs cacheadmin -addPool four_gig_pool -owner impala -limit 4000000000 CREATE DATABASE alex_upgrade_db; CREATE TABLE alex_upgrade_db.fully_cached_table (decimla_col decimal, int_col int, varchar_col varchar, char_col char(255), string_col string) PARTITIONED BY (partition_col int); INSERT INTO alex_upgrade_db.fully_cached_table PARTITION (partition_col=1) VALUES (1, 1, 'one', cast('1' as char(255)), 'one'); inserted 1 - 3 in the same manner ALTER TABLE alex_upgrade_db.fully_cached_table set cached in 'four_gig_pool'; show table stats alex_upgrade_db.fully_cached_table; Query: show table stats alex_upgrade_db.fully_cached_table +---------------+-------+--------+------+--------------+--------+-------------------+ | partition_col | #Rows | #Files | Size | Bytes Cached | Format | Incremental stats | +---------------+-------+--------+------+--------------+--------+-------------------+ | 1 | 1 | 1 | 14B | 14B | TEXT | false | | 2 | 1 | 1 | 14B | 14B | TEXT | false | | 3 | 1 | 1 | 18B | 18B | TEXT | false | | Total | 3 | 3 | 46B | 46B | | | +---------------+-------+--------+------+--------------+--------+-------------------+ CREATE TABLE alex_upgrade_db.half_cached_table (decimla_col decimal, int_col int, varchar_col varchar, char_col char(255), string_col string) PARTITIONED BY (partition_col int); INSERT INTO alex_upgrade_db.half_cached_table PARTITION (partition_col=4) VALUES (4, 4, 'four', cast('4' as char(255)), 'four'); inserted 1 - 4 in the same manner ALTER TABLE alex_upgrade_db.half_cached_table PARTITION(partition_col=1) set cached in 'four_gig_pool'; ALTER TABLE alex_upgrade_db.half_cached_table PARTITION(partition_col=3) set cached in 'four_gig_pool'; COMPUTE INCREMENTAL STATS alex_upgrade_db.half_cached_table PARTITION(partition_col=1); COMPUTE INCREMENTAL STATS alex_upgrade_db.half_cached_table PARTITION(partition_col=2); show table stats alex_upgrade_db.half_cached_table;Query: show table stats alex_upgrade_db.half_cached_table +---------------+-------+--------+------+--------------+--------+-------------------+ | partition_col | #Rows | #Files | Size | Bytes Cached | Format | Incremental stats | +---------------+-------+--------+------+--------------+--------+-------------------+ | 1 | 1 | 1 | 14B | 14B | TEXT | true | | 2 | 1 | 1 | 14B | NOT CACHED | TEXT | true | | 3 | -1 | 1 | 18B | 18B | TEXT | false | | 4 | -1 | 1 | 16B | NOT CACHED | TEXT | false | | Total | 2 | 4 | 62B | 32B | | | +---------------+-------+--------+------+--------------+--------+-------------------+ UPGRADE TO RELEASE VERSION show table stats alex_upgrade_db.half_cached_table;Query: show table stats alex_upgrade_db.half_cached_table +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+ | partition_col | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+ | 1 | 1 | 1 | 14B | 14B | 1 | TEXT | true | | 2 | 1 | 1 | 14B | NOT CACHED | NOT CACHED | TEXT | true | | 3 | -1 | 1 | 18B | 18B | 1 | TEXT | false | | 4 | -1 | 1 | 16B | NOT CACHED | NOT CACHED | TEXT | false | | Total | 2 | 4 | 62B | 32B | | | | +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+ show table stats alex_upgrade_db.fully_cached_table; Query: show table stats alex_upgrade_db.fully_cached_table +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+ | partition_col | #Rows | #Files | Size | Bytes Cached | Cache Replication | Format | Incremental stats | +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+ | 1 | 1 | 1 | 14B | 14B | 1 | TEXT | false | | 2 | 1 | 1 | 14B | 14B | 1 | TEXT | false | | 3 | 1 | 1 | 18B | 18B | 1 | TEXT | false | | Total | 3 | 3 | 46B | 46B | | | | +---------------+-------+--------+------+--------------+-------------------+--------+-------------------+