Skip to content

Commit a8d488d

Browse files
committed
Fixed type on passing a ReadCallback.
1 parent 4226cde commit a8d488d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

core/src/main/scala/astraea/spark/rasterframes/expressions/URIToRasterSource.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ package astraea.spark.rasterframes.expressions
2424
import java.net.URI
2525

2626
import astraea.spark.rasterframes.encoders.CatalystSerializer._
27+
import astraea.spark.rasterframes.ref.RasterSource.ReadCallback
2728
import astraea.spark.rasterframes.ref.{RasterRef, RasterSource}
28-
import astraea.spark.rasterframes.util._
2929
import com.typesafe.scalalogging.LazyLogging
3030
import org.apache.spark.sql.catalyst.expressions.codegen.CodegenFallback
3131
import org.apache.spark.sql.catalyst.expressions.{ExpectsInputTypes, Expression, UnaryExpression}
@@ -41,7 +41,7 @@ import org.apache.spark.unsafe.types.UTF8String
4141
*
4242
* @since 5/4/18
4343
*/
44-
case class URIToRasterSource(override val child: Expression, accumulator: Option[ReadAccumulator])
44+
case class URIToRasterSource(override val child: Expression, accumulator: Option[ReadCallback])
4545
extends UnaryExpression with ExpectsInputTypes with CodegenFallback with LazyLogging {
4646

4747
override def nodeName: String = "uri_to_raster_source"
@@ -61,8 +61,8 @@ case class URIToRasterSource(override val child: Expression, accumulator: Option
6161
object URIToRasterSource {
6262
def apply(rasterURI: Column): TypedColumn[Any, RasterRef] =
6363
new Column(new URIToRasterSource(rasterURI.expr, None)).as[RasterRef]
64-
def apply(rasterURI: Column, accumulator: ReadAccumulator): TypedColumn[Any, RasterRef] =
64+
def apply(rasterURI: Column, accumulator: ReadCallback): TypedColumn[Any, RasterRef] =
6565
new Column(new URIToRasterSource(rasterURI.expr, Option(accumulator))).as[RasterRef]
66-
def apply(rasterURI: Column, accumulator: Option[ReadAccumulator]): TypedColumn[Any, RasterRef] =
66+
def apply(rasterURI: Column, accumulator: Option[ReadCallback]): TypedColumn[Any, RasterRef] =
6767
new Column(new URIToRasterSource(rasterURI.expr, accumulator)).as[RasterRef]
6868
}

core/src/main/scala/astraea/spark/rasterframes/package.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ package object rasterframes extends StandardColumns
4747
with LazyLogging {
4848

4949
/** The generally expected tile size, as defined by configuration property `rasterframes.nominal-tile-size`.*/
50+
@transient
5051
final val NOMINAL_TILE_SIZE: Int = ConfigFactory.load().getInt("rasterframes.nominal-tile-size")
5152

5253
/**

experimental/src/main/scala/astraea/spark/rasterframes/experimental/datasource/awspds/L8Relation.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import astraea.spark.rasterframes.encoders.CatalystSerializer._
2626
import astraea.spark.rasterframes.experimental.datasource.awspds.L8Relation.Bands
2727
import astraea.spark.rasterframes.expressions.{RasterSourceToRasterRefs, URIToRasterSource}
2828
import astraea.spark.rasterframes.ref.RasterRef
29+
import astraea.spark.rasterframes.ref.RasterSource.ReadCallback
2930
import astraea.spark.rasterframes.rules.SpatialFilters.{Contains, Intersects}
3031
import astraea.spark.rasterframes.rules._
3132
import astraea.spark.rasterframes.util._
@@ -41,7 +42,7 @@ import org.apache.spark.sql.{Column, Row, SQLContext}
4142
*
4243
* @since 8/21/18
4344
*/
44-
case class L8Relation(sqlContext: SQLContext, useTiling: Boolean, accumulator: Option[ReadAccumulator], filters: Seq[Filter] = Seq.empty)
45+
case class L8Relation(sqlContext: SQLContext, useTiling: Boolean, accumulator: Option[ReadCallback], filters: Seq[Filter] = Seq.empty)
4546
extends BaseRelation with PrunedFilteredScan with SpatialRelationReceiver[L8Relation] with LazyLogging {
4647
override def schema: StructType = L8Relation.schema
4748

0 commit comments

Comments
 (0)