-
Notifications
You must be signed in to change notification settings - Fork 393
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
updated string indexer enum to match spark #93
Conversation
@RunWith(classOf[JUnitRunner]) | ||
class OpStringIndexerTest extends FlatSpec with TestSparkContext{ | ||
|
||
Spec[OpStringIndexer[_]] should "correctly set the wrapped spark stage params" in { |
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.
please move OpStringIndexer
test portion from OpStringIndexerNoFilterTest
to here as well
@@ -256,7 +256,7 @@ trait RichTextFeature { | |||
*/ | |||
def indexed( | |||
unseenName: String = OpStringIndexerNoFilter.UnseenNameDefault, | |||
handleInvalid: StringIndexerHandleInvalid = StringIndexerHandleInvalid.NoFilter | |||
handleInvalid: StringIndexerHandleInvalid = StringIndexerHandleInvalid.Keep |
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.
why change the default?
@@ -32,6 +32,7 @@ package com.salesforce.op.stages.impl.feature | |||
|
|||
import com.salesforce.op.UID | |||
import com.salesforce.op.features.types._ | |||
import com.salesforce.op.stages.impl.feature.StringIndexerHandleInvalid.{Keep, Skip} |
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.
I think you can do import com.salesforce.op.stages.impl.feature.StringIndexerHandleInvalid._
then assert(Seq(Skip, Error, Keep).contains(value), ...)
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.
some minor comments, otherwise lgtm!
error file=/home/circleci/repo/core/src/main/scala/com/salesforce/op/stages/impl/feature/OpStringIndexer.scala message=File line length exceeds 120 characters line=66 |
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
==========================================
+ Coverage 85.61% 86.13% +0.51%
==========================================
Files 292 292
Lines 8761 9519 +758
Branches 308 333 +25
==========================================
+ Hits 7501 8199 +698
- Misses 1260 1320 +60
Continue to review full report at Codecov.
|
Related issues
OpStringIndexer fails when NoFilter is set for handle invalid because this value doesnt exist in spark
Describe the proposed solution
Update enum to match spark supported valuese