private boolean prepareImport(boolean isImportCmd,
                                      boolean isLocationSet, boolean isExternalSet, boolean isPartSpecSet,
                                      boolean waitOnPrecursor,
                                      String parsedLocation, String parsedTableName, String overrideDBName,
                                      LinkedHashMap<String, String> parsedPartSpec,
                                      String fromLocn, EximUtil.SemanticAnalyzerWrapperContext x,
                                      UpdatedMetaDataTracker updatedMetadata, HiveTxnManager txnMgr,
                                      long writeId, // Initialize with 0 for non-ACID and non-MM tables.
                                      MetaData rv
  ) throws IOException, MetaException, HiveException, URISyntaxException {
    if (!isExternalSet) {
      queryState.getValidTxnList();
    }
    return prepareImport(isImportCmd, isLocationSet, isExternalSet, isPartSpecSet, waitOnPrecursor,
                         parsedLocation, parsedTableName, overrideDBName, parsedPartSpec, fromLocn,
                         x, updatedMetadata, txnMgr, writeId, rv, null, null);
  }
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