Consider a scenario where you have a large dataset with millions of rows and you want to train a machine learning model using Spark ML. Explain the steps involved in handling the large dataset and optimizing the performance of the model. Provide a code snippet demonstrating the optimization techniques used in Spark ML. | Databricks Certified Machine Learning - Associate Quiz - LeetQuiz