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

I do not think we want to check if db is None or not. We have 
```
val databaseName = dbName.getOrElse(hive.sessionState.getCurrentDatabase)
```
right in line 115.