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

assertLargeDatasetEquality enhancements #30

Open
MrPowers opened this issue Aug 22, 2018 · 3 comments
Open

assertLargeDatasetEquality enhancements #30

MrPowers opened this issue Aug 22, 2018 · 3 comments

Comments

@MrPowers
Copy link
Collaborator

Use DatasetCountMismatch for count differences.

Use basicMismatchMessage for DataFrames that aren't equal.

@cdemonchy-pro
Copy link

Here an example of what can happen

class TestStats extends FunSuite with DataFrameComparer{
  test("compare same dataframe but with ordered differently") {
    val someDF = Seq(
      (8, "bat"),
      (64, "mouse"),
      (-27, "horse")
    ).toDF("number", "word")
    assertLargeDataFrameEquality(someDF.sort('number), someDF)
  }
}
(new TestStats).execute()

[32mTestStats:[0m
[31m- compare same dataframe *** FAILED ***[0m
[31m com.github.mrpowers.spark.fast.tests.DatasetContentMismatch: Actual DataFrame Row Count: '3'[0m
[31mExpected DataFrame Row Count: '3'[0m

@MrPowers
Copy link
Collaborator Author

Screen Shot 2020-08-15 at 6 00 24 PM

@cdemonchy-pro - see above for the error message I'm currently getting when I recreate your test. Can you please send me the spark-fast-tests version you're using?

@cdemonchy-pro
Copy link

Well I am currently using version 2.3.1_0.15.0
but I am working on a Databricks cluster (Apache Spark 2.4.5, Scala 2.11) that must be a specific quirk of it, sorry for the noise

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

No branches or pull requests

2 participants