Skip to content

Commit

Permalink
fmtAll
Browse files Browse the repository at this point in the history
  • Loading branch information
grouzen committed Aug 30, 2024
1 parent 539741f commit ab9cb97
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 186 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inThisBuild(
"scm:git:git@github.com:grouzen/zio-apache-parquet.git"
)
),
crossScalaVersions := Seq(Scala213, Scala212, Scala3),
crossScalaVersions := Seq(Scala213, Scala3),
ThisBuild / scalaVersion := Scala3,
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"), JavaSpec.temurin("17")),
githubWorkflowPublishTargetBranches := Seq(),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package me.mnedokushev.zio.apache.parquet.core.filter

import me.mnedokushev.zio.apache.parquet.core.filter.internal.{ ColumnPathConcatMacro, SanitizeOptionalsMacro }
import me.mnedokushev.zio.apache.parquet.core.filter.CompiledPredicate
import me.mnedokushev.zio.apache.parquet.core.Lens
import me.mnedokushev.zio.apache.parquet.core.filter.CompiledPredicate
import me.mnedokushev.zio.apache.parquet.core.filter.internal.{ ColumnPathConcatMacro, SanitizeOptionalsMacro }

package object syntax {

Expand All @@ -11,8 +11,7 @@ package object syntax {
Column.Named(column.path)
}

def predicate[A](predicate: Predicate[A]): CompiledPredicate =
macro SanitizeOptionalsMacro.sanitizeImpl[A]
def predicate[A](predicate: Predicate[A]): CompiledPredicate = macro SanitizeOptionalsMacro.sanitizeImpl[A]

def concat[A, B, F](
parent: Column[A],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.mnedokushev.zio.apache.parquet.core.filter.internal

import me.mnedokushev.zio.apache.parquet.core.filter.Predicate
import me.mnedokushev.zio.apache.parquet.core.filter.{ CompiledPredicate, Predicate }
import org.apache.parquet.filter2.predicate.FilterPredicate

import scala.quoted.*
import me.mnedokushev.zio.apache.parquet.core.filter.CompiledPredicate

object SanitizeOptionalsMacro {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package me.mnedokushev.zio.apache.parquet.core.filter

import me.mnedokushev.zio.apache.parquet.core.filter.internal.ColumnPathConcatMacro
import me.mnedokushev.zio.apache.parquet.core.filter.internal.SanitizeOptionalsMacro
import me.mnedokushev.zio.apache.parquet.core.Lens
import me.mnedokushev.zio.apache.parquet.core.filter.internal.{ ColumnPathConcatMacro, SanitizeOptionalsMacro }

package object syntax {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package me.mnedokushev.zio.apache.parquet.core.filter

import org.apache.parquet.filter2.predicate.FilterPredicate
import org.apache.parquet.filter2.predicate.Operators
import org.apache.parquet.filter2.predicate.FilterApi
import org.apache.parquet.filter2.predicate.{ FilterApi, FilterPredicate, Operators }
import zio.prelude._

sealed trait Predicate[A] { self =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package me.mnedokushev.zio.apache.parquet.core.hadoop

import me.mnedokushev.zio.apache.parquet.core.Value.GroupValue.RecordValue
import me.mnedokushev.zio.apache.parquet.core.codec.{ SchemaEncoder, ValueDecoder }
import me.mnedokushev.zio.apache.parquet.core.filter.CompiledPredicate
import org.apache.hadoop.conf.Configuration
import org.apache.parquet.filter2.compat.FilterCompat
import org.apache.parquet.hadoop.api.{ ReadSupport => HadoopReadSupport }
Expand All @@ -12,7 +13,6 @@ import zio.schema.Schema
import zio.stream._

import java.io.IOException
import me.mnedokushev.zio.apache.parquet.core.filter.CompiledPredicate

trait ParquetReader[+A <: Product] {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
package me.mnedokushev.zio.apache.parquet.core

import me.mnedokushev.zio.apache.parquet.core.codec.{
SchemaEncoder,
SchemaEncoderDeriver,
ValueDecoder,
ValueDecoderDeriver,
ValueEncoder,
ValueEncoderDeriver
}
import me.mnedokushev.zio.apache.parquet.core.filter.{ TypeTag, TypeTagDeriver }
import org.apache.parquet.filter2.predicate.FilterApi
import org.apache.parquet.filter2.predicate.Operators.BinaryColumn
import org.apache.parquet.io.api.Binary
Expand All @@ -8,14 +17,6 @@ import zio.schema._

import java.time._
import java.util.UUID
import me.mnedokushev.zio.apache.parquet.core.codec.SchemaEncoder
import me.mnedokushev.zio.apache.parquet.core.codec.ValueEncoder
import me.mnedokushev.zio.apache.parquet.core.codec.SchemaEncoderDeriver
import me.mnedokushev.zio.apache.parquet.core.codec.ValueDecoder
import me.mnedokushev.zio.apache.parquet.core.codec.ValueEncoderDeriver
import me.mnedokushev.zio.apache.parquet.core.codec.ValueDecoderDeriver
import me.mnedokushev.zio.apache.parquet.core.filter.TypeTagDeriver
import me.mnedokushev.zio.apache.parquet.core.filter.TypeTag

object Fixtures {

Expand Down Expand Up @@ -101,7 +102,7 @@ object Fixtures {
}

case class MyProjectedRecordIO(a: Int, c: Option[Long], d: List[Int], e: Map[String, Int])
object MyProjectedRecordIO {
object MyProjectedRecordIO {
implicit val schema: zio.schema.Schema.CaseClass4.WithFields[
"a",
"c",
Expand Down Expand Up @@ -145,7 +146,7 @@ object Fixtures {
zoneId: ZoneId,
zoneOffset: ZoneOffset
)
object MyRecordAllTypes1 {
object MyRecordAllTypes1 {
implicit val schema: zio.schema.Schema.CaseClass21.WithFields[
"string",
"boolean",
Expand Down Expand Up @@ -205,7 +206,7 @@ object Fixtures {
offsetDateTime: OffsetDateTime,
zonedDateTime: ZonedDateTime
)
object MyRecordAllTypes2 {
object MyRecordAllTypes2 {
implicit val schema: zio.schema.Schema.CaseClass8.WithFields[
"duration",
"instant",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.mnedokushev.zio.apache.parquet.core.filter

import me.mnedokushev.zio.apache.parquet.core.Fixtures._
import me.mnedokushev.zio.apache.parquet.core.Value
import me.mnedokushev.zio.apache.parquet.core.filter.TypeTag._
import me.mnedokushev.zio.apache.parquet.core.filter.syntax._
Expand All @@ -12,8 +13,6 @@ import java.time._
import java.util.UUID
import scala.jdk.CollectionConverters._

import me.mnedokushev.zio.apache.parquet.core.Fixtures._

object ExprSpec extends ZIOSpecDefault {

override def spec: Spec[TestEnvironment & Scope, Any] =
Expand Down Expand Up @@ -292,34 +291,34 @@ object ExprSpec extends ZIOSpecDefault {
val zonedDateTimeResult = predicate(zonedDateTime === zonedDateTimePayload)

assert(stringResul)(isRight(equalTo(stringExpected))) &&
assert(booleanResult)(isRight(equalTo(booleanExpected))) &&
assert(byteResult)(isRight(equalTo(byteExpected))) &&
assert(shortResult)(isRight(equalTo(shortExpected))) &&
assert(intResult)(isRight(equalTo(intExpected))) &&
assert(longResult)(isRight(equalTo(longExpected))) &&
assert(floatResult)(isRight(equalTo(floatExpected))) &&
assert(doubleResult)(isRight(equalTo(doubleExpected))) &&
assert(binaryResult)(isRight(equalTo(binaryExpected))) &&
assert(charResult)(isRight(equalTo(charExpected))) &&
assert(uuidResult)(isRight(equalTo(uuidExpected))) &&
assert(bigDecimalResult)(isRight(equalTo(bigDecimalExpected))) &&
assert(bigIntegerResult)(isRight(equalTo(bigIntegerExpected))) &&
assert(dayOfWeekResult)(isRight(equalTo(dayOfWeekExpected))) &&
assert(monthResult)(isRight(equalTo(monthExpected))) &&
assert(monthDayResult)(isRight(equalTo(monthDayExpected))) &&
assert(periodResult)(isRight(equalTo(periodExpected))) &&
assert(yearResult)(isRight(equalTo(yearExpected))) &&
assert(yearMonthResult)(isRight(equalTo(yearMonthExpected))) &&
assert(zoneIdResult)(isRight(equalTo(zoneIdExpected))) &&
assert(zoneOffsetResult)(isRight(equalTo(zoneOffsetExpected))) &&
assert(durationResult)(isRight(equalTo(durationExpected))) &&
assert(instantResult)(isRight(equalTo(instantExpected))) &&
assert(localDateResult)(isRight(equalTo(localDateExpected))) &&
assert(localTimeResult)(isRight(equalTo(localTimeExpected))) &&
assert(localDateTimeResult)(isRight(equalTo(localDateTimeExpected))) &&
assert(offsetTimeResult)(isRight(equalTo(offsetTimeExpected))) &&
assert(offsetDateTimeResult)(isRight(equalTo(offsetDateTimeExpected))) &&
assert(zonedDateTimeResult)(isRight(equalTo(zonedDateTimeExpected)))
assert(booleanResult)(isRight(equalTo(booleanExpected))) &&
assert(byteResult)(isRight(equalTo(byteExpected))) &&
assert(shortResult)(isRight(equalTo(shortExpected))) &&
assert(intResult)(isRight(equalTo(intExpected))) &&
assert(longResult)(isRight(equalTo(longExpected))) &&
assert(floatResult)(isRight(equalTo(floatExpected))) &&
assert(doubleResult)(isRight(equalTo(doubleExpected))) &&
assert(binaryResult)(isRight(equalTo(binaryExpected))) &&
assert(charResult)(isRight(equalTo(charExpected))) &&
assert(uuidResult)(isRight(equalTo(uuidExpected))) &&
assert(bigDecimalResult)(isRight(equalTo(bigDecimalExpected))) &&
assert(bigIntegerResult)(isRight(equalTo(bigIntegerExpected))) &&
assert(dayOfWeekResult)(isRight(equalTo(dayOfWeekExpected))) &&
assert(monthResult)(isRight(equalTo(monthExpected))) &&
assert(monthDayResult)(isRight(equalTo(monthDayExpected))) &&
assert(periodResult)(isRight(equalTo(periodExpected))) &&
assert(yearResult)(isRight(equalTo(yearExpected))) &&
assert(yearMonthResult)(isRight(equalTo(yearMonthExpected))) &&
assert(zoneIdResult)(isRight(equalTo(zoneIdExpected))) &&
assert(zoneOffsetResult)(isRight(equalTo(zoneOffsetExpected))) &&
assert(durationResult)(isRight(equalTo(durationExpected))) &&
assert(instantResult)(isRight(equalTo(instantExpected))) &&
assert(localDateResult)(isRight(equalTo(localDateExpected))) &&
assert(localTimeResult)(isRight(equalTo(localTimeExpected))) &&
assert(localDateTimeResult)(isRight(equalTo(localDateTimeExpected))) &&
assert(offsetTimeResult)(isRight(equalTo(offsetTimeExpected))) &&
assert(offsetDateTimeResult)(isRight(equalTo(offsetDateTimeExpected))) &&
assert(zonedDateTimeResult)(isRight(equalTo(zonedDateTimeExpected)))
},
test("compile option") {
// TODO: test failing compile-time cases
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package me.mnedokushev.zio.apache.parquet.core.hadoop

import me.mnedokushev.zio.apache.parquet.core.Fixtures._
import me.mnedokushev.zio.apache.parquet.core.filter._
import me.mnedokushev.zio.apache.parquet.core.filter.syntax._
import zio._
import zio.stream._
import zio.test.TestAspect._
import zio.test._

import java.nio.file.Files
import me.mnedokushev.zio.apache.parquet.core.filter._
import me.mnedokushev.zio.apache.parquet.core.filter.syntax._
import me.mnedokushev.zio.apache.parquet.core.Fixtures._

object ParquetIOSpec extends ZIOSpecDefault {

Expand Down
2 changes: 0 additions & 2 deletions project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ object BuildHelper {

def crossVersionSources(scalaVersion: String, conf: String, baseDirectory: File): List[File] = {
val versions = CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 12)) =>
List("2", "2.12")
case Some((2, 13)) =>
List("2", "2.13", "2.13+")
case Some((3, _)) =>
Expand Down

0 comments on commit ab9cb97

Please sign in to comment.