Skip to content

updated string indexer enum to match spark#93

Merged
tovbinm merged 5 commits intomasterfrom
lm/stringIndex
Aug 27, 2018
Merged

updated string indexer enum to match spark#93
tovbinm merged 5 commits intomasterfrom
lm/stringIndex

Conversation

@leahmcguire
Copy link
Copy Markdown
Collaborator

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

@leahmcguire leahmcguire requested a review from tovbinm as a code owner August 27, 2018 17:41
@RunWith(classOf[JUnitRunner])
class OpStringIndexerTest extends FlatSpec with TestSparkContext{

Spec[OpStringIndexer[_]] should "correctly set the wrapped spark stage params" in {
Copy link
Copy Markdown
Collaborator

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

def indexed(
unseenName: String = OpStringIndexerNoFilter.UnseenNameDefault,
handleInvalid: StringIndexerHandleInvalid = StringIndexerHandleInvalid.NoFilter
handleInvalid: StringIndexerHandleInvalid = StringIndexerHandleInvalid.Keep
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why change the default?


import com.salesforce.op.UID
import com.salesforce.op.features.types._
import com.salesforce.op.stages.impl.feature.StringIndexerHandleInvalid.{Keep, Skip}
Copy link
Copy Markdown
Collaborator

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), ...)

Copy link
Copy Markdown
Collaborator

@tovbinm tovbinm left a 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!

@tovbinm
Copy link
Copy Markdown
Collaborator

tovbinm commented Aug 27, 2018

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
Copy link
Copy Markdown

codecov bot commented Aug 27, 2018

Codecov Report

Merging #93 into master will increase coverage by 0.51%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...force/op/stages/impl/feature/OpStringIndexer.scala 100% <100%> (ø) ⬆️
...es/src/main/scala/com/salesforce/op/OpParams.scala 89.58% <0%> (+4.16%) ⬆️
...om/salesforce/op/testkit/FeatureFactoryOwner.scala 100% <0%> (+100%) ⬆️
...a/com/salesforce/op/testkit/PartiallyDefined.scala 100% <0%> (+100%) ⬆️
...in/scala/com/salesforce/op/testkit/RandomSet.scala 66.66% <0%> (+66.66%) ⬆️
...com/salesforce/op/testkit/StandardRandomData.scala 100% <0%> (+100%) ⬆️
...ala/com/salesforce/op/testkit/InfiniteStream.scala 100% <0%> (+100%) ⬆️
...n/scala/com/salesforce/op/testkit/RandomData.scala 100% <0%> (+100%) ⬆️
...ala/com/salesforce/op/testkit/RandomIntegral.scala 100% <0%> (+100%) ⬆️
...com/salesforce/op/testkit/ProbabilityOfEmpty.scala 100% <0%> (+100%) ⬆️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0e1480...9ece16b. Read the comment docs.

@tovbinm tovbinm merged commit cba4ac6 into master Aug 27, 2018
@tovbinm tovbinm deleted the lm/stringIndex branch August 27, 2018 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants