-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
311 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 16 additions & 17 deletions
33
...s/core/src/main/scala/me/mnedokushev/zio/apache/parquet/core/filter/OperatorSupport.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
package me.mnedokushev.zio.apache.parquet.core.filter | ||
|
||
sealed trait OperatorSupport[A] { | ||
def typeTag: TypeTag[A] | ||
} | ||
import scala.annotation.implicitNotFound | ||
|
||
sealed trait OperatorSupport[A] | ||
|
||
object OperatorSupport { | ||
|
||
abstract class LessGreater[A: TypeTag] extends OperatorSupport[A] { | ||
override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] | ||
} | ||
@implicitNotFound("You can't use this operator for the type ${A}") | ||
abstract class LtGt[A: TypeTag] extends OperatorSupport[A] | ||
|
||
object LessGreater { | ||
implicit case object Byte extends LessGreater[Byte] | ||
implicit case object Short extends LessGreater[Short] | ||
implicit case object Int extends LessGreater[Int] | ||
object LtGt { | ||
implicit case object SByte extends LtGt[Byte] | ||
implicit case object SShort extends LtGt[Short] | ||
implicit case object SInt extends LtGt[Int] | ||
} | ||
|
||
abstract class EqNotEq[A: TypeTag] extends OperatorSupport[A] { | ||
override def typeTag: TypeTag[A] = implicitly[TypeTag[A]] | ||
} | ||
@implicitNotFound("You can't use this operator for the type ${A}") | ||
abstract class EqNotEq[A: TypeTag] extends OperatorSupport[A] | ||
|
||
object EqNotEq { | ||
implicit case object String extends EqNotEq[String] | ||
implicit case object Boolean extends EqNotEq[Boolean] | ||
implicit case object Byte extends EqNotEq[Byte] | ||
implicit case object Short extends EqNotEq[Short] | ||
implicit case object SString extends EqNotEq[String] | ||
implicit case object SBoolean extends EqNotEq[Boolean] | ||
implicit case object SByte extends EqNotEq[Byte] | ||
implicit case object SShort extends EqNotEq[Short] | ||
implicit case object SInt extends EqNotEq[Int] | ||
} | ||
|
||
} |
Oops, something went wrong.