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

[ADAM-473] Make RecordCondition and FieldCondition public #503

Merged
merged 1 commit into from
Nov 22, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ object ColumnReaderInput extends Serializable {
}
}

private[predicates] case class FieldCondition[T](fieldName: String,
filter: T => Boolean)(implicit converter: ColumnReaderInput[T])
case class FieldCondition[T](fieldName: String, filter: T => Boolean)(implicit converter: ColumnReaderInput[T])
extends Predicate {

def apply(input: Any): Boolean = {
Expand All @@ -78,7 +77,7 @@ private[predicates] case class FieldCondition[T](fieldName: String,

}

private[predicates] object FieldCondition {
object FieldCondition {

def apply(field: AlignmentRecordField.Value,
filterValue: Boolean)(implicit converter: ColumnReaderInput[Boolean]): FieldCondition[Boolean] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import parquet.filter.{ AndRecordFilter, OrRecordFilter, UnboundRecordFilter }
import org.bdgenomics.adam.util.ImplicitJavaConversions._
import scala.annotation.tailrec

private[predicates] object RecordCondition {
object RecordCondition {

// Convert predicate on single field to predicate on record
def getRecordPredicate[T <: SpecificRecord: Manifest, U](condition: FieldCondition[U]): T => Boolean = {
Expand Down Expand Up @@ -81,8 +81,7 @@ private[predicates] object RecordCondition {
* with Parquet stored files
*
*/
private[predicates] class RecordCondition[T <% SpecificRecord: Manifest] private (val filter: T => Boolean,
val recordFilter: UnboundRecordFilter)
class RecordCondition[T <% SpecificRecord: Manifest](val filter: T => Boolean, val recordFilter: UnboundRecordFilter)
extends Serializable {

// Combine two predicates through an AND
Expand Down