apply global patch on Spark source