A pitfall of StringIndexer + OneHotEncoder in production is:
Select an answer to reveal the explanation.
Short Explanation
New categories in prod will bite you — plan handleInvalid and retraining.
Full Explanation
Category vocabulary must be managed; unseen labels need configured handling.