Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/19621#discussion_r157158872
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala ---
@@ -79,20 +80,49 @@ private[feature] trait StringIndexerBase extends Params
with HasHandleInvalid wi
@Since("2.3.0")
def getStringOrderType: String = $(stringOrderType)
+ private[feature] def getInOutCols: (Array[String], Array[String]) = {
+
+ require((isSet(inputCol) && isSet(outputCol) && !isSet(inputCols) &&
!isSet(outputCols)) ||
+ (!isSet(inputCol) && !isSet(outputCol) && isSet(inputCols) &&
isSet(outputCols)),
+ "Only allow to set either inputCol/outputCol, or
inputCols/outputCols"
--- End diff --
Maybe match the language for the exception message
[here](https://github.com/apache/spark/pull/19715/files#diff-bf4cb764860f82d632ac0730e3d8c605R173)?
`StringIndexer only supports setting either inputCol/outputCol or
inputCols/outputCols`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]