Ferroelectric polarization-controlled resistive switching in BaTiO3/SmNiO3 epitaxial heterostructures