[SPARK-3418] Squashed missing alpha bug.
merged with updated pull request for SPARK-3418