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

Subclass testing bug in AdamContext.adamLoad #12

Merged
merged 1 commit into from
Nov 30, 2013

Conversation

tdanford
Copy link
Contributor

See the comment there -- basically, we weren't testing for a subclass
relationship between the type parameter T and ADAMRecord in the right way,
I think.

Added a test to make sure that we can load SAM files correctly.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM/45/

@@ -107,7 +107,17 @@ class AdamContext(sc: SparkContext) extends Serializable with Logging {
*/
def adamLoad[T <% SpecificRecord : Manifest, U <: UnboundRecordFilter]
(filePath: String, predicate: Option[Class[U]] = None, projection: Option[Schema] = None): RDD[T] = {
if (filePath.endsWith(".bam") || filePath.endsWith(".sam") && manifest[T].erasure.isInstanceOf[ADAMRecord]) {

/**
Copy link
Member

Choose a reason for hiding this comment

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

This commit looks great and the explanation in this comment is great for reviewers. I'm not sure we need to commit it as will likely confuse future developers as they don't have the context. Otherwise, I'm happy to merge this right away.

I'll try to jump over to your Sequence Dictionary pull request soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll pull out the comment, and then try using SparkFunSuite below. No rush on the sequence dictionary -- this was a bug that I actually discovered while testing out some of my work on that request, and I figured could become its own separate bug and report. Not a big deal.

See the comment there -- basically, we weren't testing for a subclass
relationship between the type parameter T and ADAMRecord in the right way,
I think?

Added a test to make sure that we can load SAM files correctly.
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@tdanford
Copy link
Contributor Author

It should be ready to go, Matt.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/ADAM/46/

@massie
Copy link
Member

massie commented Nov 30, 2013

Thanks, Timothy!

@massie massie closed this Nov 30, 2013
@tdanford tdanford deleted the subclass-error branch November 30, 2013 16:25
@tdanford tdanford restored the subclass-error branch November 30, 2013 16:27
@tdanford
Copy link
Contributor Author

Wait, did you merge this? Or just close it?

@massie massie reopened this Nov 30, 2013
massie added a commit that referenced this pull request Nov 30, 2013
Subclass testing bug in AdamContext.adamLoad
@massie massie merged commit 7941dda into bigdatagenomics:master Nov 30, 2013
@massie
Copy link
Member

massie commented Nov 30, 2013

I meant to merge this not just close it.

@tdanford tdanford deleted the subclass-error branch November 30, 2013 16:33
@tdanford
Copy link
Contributor Author

Thanks! :-D

ryan-williams added a commit to ryan-williams/adam that referenced this pull request Apr 3, 2017
merge in upstream, use hammerlab.paths.Path
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