[SPARK-2917] [SQL] Avoid table creation in logical plan analyzing for CTAS

This should be the intention. Instead of reverting code here, I'd like to update the code at `HiveMetastoreCatalog.looupRelatoin`, which will get the current database name from the `HiveSessionState`.