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

Return results of compareAppleTables in a wrapper class #13

Open
aosama opened this issue Feb 16, 2018 · 3 comments
Open

Return results of compareAppleTables in a wrapper class #13

aosama opened this issue Feb 16, 2018 · 3 comments

Comments

@aosama
Copy link
Member

aosama commented Feb 16, 2018

have the compareAppleTable method return the results in a wrapper class that will further provide more APIs.

So the code should look something like this

result = compareAppleTables(x,y).getLeft().sortByCols(“a”,“b”)
OR
result = compareAppleTables(x,y).getJoinedByCols(“a”,“b”).sortBy(“a”,“b”)

@mmlinford
Copy link
Collaborator

@aosama I thought about this a little after we met today. Apparently Pair is just an abstract class. So if we made the new wrapper class a decorator for Pair<DataFrame, DataFrame> I believe it would be a non-breaking change, unless Scala has quirks about covariant return types that I don't know about.

@mmlinford
Copy link
Collaborator

Since we've apparently decided to do breaking changes anyways, it might not be worth it to go with the suggestion I made (extending Pair is a little weird).

@aosama
Copy link
Member Author

aosama commented Oct 4, 2018

was thinking of a custom result class like so

class ComparisonResults
{
inLeftNotInRight :DataFrame
inRightNotInLeft: DataFrame
def joinedResults(keys :Seq[String]) // this will return a full outer join between the differences
}
@mmlinford what do you think?

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