Skip to content

Commit

Permalink
Fix scala compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Oct 9, 2023
1 parent 4c93851 commit e4dad88
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/scala/com/exasol/cloudetl/DataRecords.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ trait DataRecords {
val TIMESTAMP_VALUE2: Timestamp = new Timestamp(System.currentTimeMillis())

val rawRecords: Seq[Seq[Object]] = Seq(
Seq(1, 3L, BIG_DECIMAL_VALUE1, 3.14d, "xyz", true, DATE_VALUE1, TIMESTAMP_VALUE1),
Seq(2, 4L, BIG_DECIMAL_VALUE2, 0.13d, "abc", false, DATE_VALUE2, TIMESTAMP_VALUE2)
Seq[Any](1, 3L, BIG_DECIMAL_VALUE1, 3.14d, "xyz", true, DATE_VALUE1, TIMESTAMP_VALUE1),
Seq[Any](2, 4L, BIG_DECIMAL_VALUE2, 0.13d, "abc", false, DATE_VALUE2, TIMESTAMP_VALUE2)
).map { seq =>
seq.map(_.asInstanceOf[AnyRef])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ trait BaseDataImporter extends BaseS3IntegrationTest with BeforeAndAfterEach wit
val fileCounter = String.format("%04d", paths.length)
val newPath = new HPath(outputDirectory.toUri.toString, s"$baseFileName$fileCounter.$dataFormat")
paths = paths.appended(newPath)
return newPath
newPath
}

abstract class AbstractChecker(exaColumnType: String, tableName: String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class TableDataExporterTest extends StorageTest with BeforeAndAfterEach with Dat

FilesDataImporter.run(mock[ExaMetadata], importIter)

verify(importIter, times(2)).emit(anyObjects)
verify(importIter, times(2)).emit(anyObjects())
verify(iterator, times(1)).emit(Long.valueOf(2))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import org.scalatest.funsuite.AnyFunSuite
class DefaultTransformationTest extends AnyFunSuite {

val longString = getRandomString(2000010)
val values = Array(1, 3.14, "abc", longString).map(_.asInstanceOf[Object])
val values = Array[Any](1, 3.14, "abc", longString).map(_.asInstanceOf[Object])

test("truncates strings larger than maximum varchar size") {
val properties = StorageProperties(Map(TRUNCATE_STRING -> "true"))
val expected = Array(1, 3.14, "abc", longString.substring(0, 2000000)).map(_.asInstanceOf[Object])
val expected = Array[Any](1, 3.14, "abc", longString.substring(0, 2000000)).map(_.asInstanceOf[Object])
assert(new DefaultTransformation(properties).transform(Array.from(values)) === expected)
}

Expand Down

0 comments on commit e4dad88

Please sign in to comment.