When using saveAsTable in append mode, data will be written to the wrong location for non-managed Datasource tables. The following example illustrates this.
It seems somehow pass the wrong table path to InsertIntoHadoopFsRelation from DataFrameWriter. Also, we should probably remove the repair table call at the end of saveAsTable in DataFrameWriter. That shouldn't be needed in either the Hive or Datasource case.