Skip to content
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

Add unit tests #99

Merged
merged 6 commits into from
Dec 2, 2022
Merged

Conversation

jiminhsieh
Copy link
Contributor

Fix part of #64.

Finish the rest of the unit tests of WordCountTest, AccumulatorsTest, and MixedDatasetSuite.

In the same time, I add comment mark to ignore coverage of the main method.

@@ -89,7 +89,7 @@ class MixedDataset(sqlCtx: SQLContext) {
Dataset[(RawPanda, CoffeeShop)] = {
//tag::joinWith[]
val result: Dataset[(RawPanda, CoffeeShop)] = pandas.joinWith(coffeeShops,
$"zip" === $"zip")
pandas("zip") === coffeeShops("zip"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Below log is the reason I need to change as above:

[info] - self join *** FAILED ***
[info]   org.apache.spark.sql.AnalysisException: Reference 'zip' is ambiguous, could be: zip#178, zip#195.;
[info]   at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolve(LogicalPlan.scala:287)

val result: Dataset[(RawPanda, RawPanda)] = pandas.joinWith(pandas,
$"zip" === $"zip")
val result: Dataset[(RawPanda, RawPanda)] = pandas.as("l").joinWith(pandas.as("r"),
$"l.zip" === $"r.zip")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

@codecov
Copy link

codecov bot commented Sep 17, 2019

Codecov Report

Merging #99 into master will increase coverage by 3.71%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   44.76%   48.48%   +3.71%     
==========================================
  Files          39       33       -6     
  Lines         994      959      -35     
  Branches       35       21      -14     
==========================================
+ Hits          445      465      +20     
+ Misses        549      494      -55
Impacted Files Coverage Δ
...rmance-spark-examples/dataframe/MixedDataset.scala 100% <100%> (+61.11%) ⬆️
...formance-spark-examples/native/NativeExample.scala
...-spark-examples/transformations/Accumulators.scala
...performance-spark-examples/ml/CustomPipeline.scala
...rformance-spark-examples/ml/SimpleNaiveBayes.scala
...rformance-spark-examples/dataframe/RawPandas.scala 80% <0%> (+40%) ⬆️
...rformance-spark-examples/wordcount/WordCount.scala 100% <0%> (+50%) ⬆️

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 f02142b...da2ca94. Read the comment docs.

@holdenk holdenk merged commit b4c5daf into high-performance-spark:master Dec 2, 2022
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