synced with original upstream with the patch of SQOOP-1390