Fix CTAS errors when ugprading to Hive 0.10.0