private static Task<?> alterTableTask(ImportTableDesc tableDesc,
                                        EximUtil.SemanticAnalyzerWrapperContext x,
                                        ReplicationSpec replicationSpec, boolean isReplication,
                                        String dumpRoot, ReplicationMetricCollector metricCollector) {
    tableDesc.setReplaceMode(true);
    if ((replicationSpec != null) && (replicationSpec.isInReplicationScope())) {
      tableDesc.setReplicationSpec(replicationSpec);
    }
    return tableDesc.getCreateTableTask(x.getInputs(), x.getOutputs(), x.getConf(), isReplication,
                                        dumpRoot, metricCollector, false);
  }
The same code is used from both the "repl load" as well as "import".
Given that "repl load" now supports two modes "repl load dbName [location]" and
"repl load [location]" in which case the database name has to be taken from the table metadata
by default and then over-ridden if something specified on the command line.
<p>
hence for import to work correctly we have to pass in the sessionState default Db via the
parsedDbName parameter
ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyzer.java