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 Product as upper type bound for asSchema #81

Merged
merged 1 commit into from
May 12, 2019

Conversation

manuzhang
Copy link
Collaborator

No description provided.

@MrPowers
Copy link
Collaborator

Related issue: #78

@MrPowers
Copy link
Collaborator

@manuzhang - this looks good. I don't really know too much about Product, but can infer what this is trying to do from your issue. Can you please write a test to demonstrate that this revised code is throwing a compile time error instead of a MatchError at runtime? Thanks!

@manuzhang
Copy link
Collaborator Author

@MrPowers Product is the superclass of both case class and Tuple. Not sure there is a way to expect a failure at compile time.

@MrPowers
Copy link
Collaborator

@manuzhang - thanks. If you and @snithish think this is good, then you're right that it should get merged. Adding it now.

Going to open an issue about potentially collaborating to open a Spark pull request for this function. This should probably be a core function offered by Spark.

@MrPowers MrPowers merged commit aff13c2 into mrpowers-io:master May 12, 2019
@MrPowers
Copy link
Collaborator

@manuzhang - uTest has a compileError macro (https://github.com/lihaoyi/utest#compile-error) that "works similarly to intercept, except it does its checks (that a snippet of code fails) and errors (if it doesn't fail) at compile-time rather than run-time". Is it possible that we can use compileError to make sure the code you've added is working as expected in the test suite?

@manuzhang
Copy link
Collaborator Author

@MrPowers Interesting. Let me try

@manuzhang
Copy link
Collaborator Author

@MrPowers Please check out #91

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.

3 participants