Skip to content

Commit

Permalink
Merge pull request #503 from laserson/ADAM-473
Browse files Browse the repository at this point in the history
[ADAM-473] Make RecordCondition and FieldCondition public
  • Loading branch information
fnothaft committed Nov 22, 2014
2 parents 995f72c + 1686906 commit 6d9f45e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
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
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

0 comments on commit 6d9f45e

Please sign in to comment.