-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-22799][ML] Bucketizer should throw exception if single- and multi-column params are both set #19993
[SPARK-22799][ML] Bucketizer should throw exception if single- and multi-column params are both set #19993
Changes from 1 commit
8f3581c
bb0c0d2
9f56800
f593f5b
2ecdc73
26fe05e
64634b5
9872bfd
d0b8d06
b20fb91
09d652d
a0c0fed
25b9bd4
18bbf61
d9d25b0
8c162a3
7894609
ebc6d16
2bc5cb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,10 +140,10 @@ final class Bucketizer @Since("1.4.0") (@Since("1.4.0") override val uid: String | |
* by `inputCol`. A warning will be printed if both are set. | ||
*/ | ||
private[feature] def isBucketizeMultipleColumns(): Boolean = { | ||
if (isSet(inputCols) && isSet(inputCol)) { | ||
logWarning("Both `inputCol` and `inputCols` are set, we ignore `inputCols` and this " + | ||
"`Bucketizer` only map one column specified by `inputCol`") | ||
false | ||
if (isSet(inputCols) && isSet(inputCol) || isSet(inputCols) && isSet(outputCol) || | ||
isSet(inputCol) && isSet(outputCols)) { | ||
throw new IllegalArgumentException("Both `inputCol` and `inputCols` are set, `Bucketizer` " + | ||
"only supports setting either `inputCol` or `inputCols`.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here it is better to add one more check: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks. I will add these checks while doing the changes requested by @hhbyyh. Thanks. |
||
} else if (isSet(inputCols)) { | ||
true | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should modify the document above too.