SPARK-19765, from version 2.1.1, UNCACHE TABLE also un-cache all cached plans that refer to this table.
My scene like this picture below. When I have finished step 1, I cannot do dropTempView "ods_table1" and "dwd_table2", util I also finish step 2. It waste a lot of memory.
Can dropTempView function add a param like dropTempView(viewName: String, dropSelfOnly: Boolean). As my scene, After dropTempView "dwd_table2", "dw_table3" would still keep cache in memory.
Or add a new feacture: supports create materialized views.