presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/ShardDao.java/ShardDao/externalBatchExists
class ShardDao:    @SqlQuery("SELECT count(*)\n" +
            "FROM external_batches\n" +
            "WHERE external_batch_id = :externalBatchId")
    boolean externalBatchExists(@Bind("externalBatchId") String externalBatchId);