Skip to content

Commit

Permalink
Fix formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
milos.colic committed Jan 15, 2024
1 parent f828605 commit 8791ef7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion python/mosaic/api/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,9 @@ def rst_fromcontent(raster: ColumnOrName, driver: ColumnOrName, sizeInMB: Column
"""

return config.mosaic_context.invoke_function(
"rst_fromcontent", pyspark_to_java_column(raster), pyspark_to_java_column(driver),
"rst_fromcontent",
pyspark_to_java_column(raster),
pyspark_to_java_column(driver),
pyspark_to_java_column(sizeInMB)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,16 +711,15 @@ class MosaicContext(indexSystem: IndexSystem, geometryAPI: GeometryAPI) extends
ColumnAdapter(RST_Tessellate(raster.expr, resolution.expr, expressionConfig))
def rst_tessellate(raster: Column, resolution: Int): Column =
ColumnAdapter(RST_Tessellate(raster.expr, lit(resolution).expr, expressionConfig))
def rst_fromcontent(raster: Column, driver:Column): Column =
def rst_fromcontent(raster: Column, driver: Column): Column =
ColumnAdapter(RST_FromContent(raster.expr, driver.expr, lit(-1).expr, expressionConfig))
def rst_fromcontent(raster: Column, driver:Column, sizeInMB:Column): Column =
def rst_fromcontent(raster: Column, driver: Column, sizeInMB: Column): Column =
ColumnAdapter(RST_FromContent(raster.expr, driver.expr, sizeInMB.expr, expressionConfig))
def rst_fromcontent(raster: Column, driver:String): Column =
def rst_fromcontent(raster: Column, driver: String): Column =
ColumnAdapter(RST_FromContent(raster.expr, lit(driver).expr, lit(-1).expr, expressionConfig))
def rst_fromcontent(raster: Column, driver:String, sizeInMB:Int): Column =
def rst_fromcontent(raster: Column, driver: String, sizeInMB: Int): Column =
ColumnAdapter(RST_FromContent(raster.expr, lit(driver).expr, lit(sizeInMB).expr, expressionConfig))
def rst_fromfile(raster: Column): Column =
ColumnAdapter(RST_FromFile(raster.expr, lit(-1).expr, expressionConfig))
def rst_fromfile(raster: Column): Column = ColumnAdapter(RST_FromFile(raster.expr, lit(-1).expr, expressionConfig))
def rst_fromfile(raster: Column, sizeInMB: Column): Column =
ColumnAdapter(RST_FromFile(raster.expr, sizeInMB.expr, expressionConfig))
def rst_fromfile(raster: Column, sizeInMB: Int): Column =
Expand Down Expand Up @@ -1015,11 +1014,12 @@ object MosaicContext extends Logging {

val isML = sparkVersion.contains("-ml-")
val isPhoton = sparkVersion.contains("-photon-")
val isTest = (
dbrMajor == 0
&& !spark.conf.getAll.exists(_._1.startsWith("spark.databricks.clusterUsageTags."))
)

val isTest =
(
dbrMajor == 0
&& !spark.conf.getAll.exists(_._1.startsWith("spark.databricks.clusterUsageTags."))
)

if (dbrMajor != 13 && !isTest) {
val msg = """|DEPRECATION ERROR:
| Mosaic v0.4.x series only supports Databricks Runtime 13.
Expand All @@ -1039,7 +1039,7 @@ object MosaicContext extends Logging {
logError(msg)
println(msg)
throw new Exception(msg)
}
}
true
}

Expand Down

0 comments on commit 8791ef7

Please sign in to comment.