Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard Wolters committed Sep 11, 2023
1 parent 5bae434 commit 090c9fd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,15 @@ class INFunctionsIT extends DslITSpec {
)
).futureValue should be("")
}

it should "use/cast big decimal" in {
assumeMinimalClickhouseVersion(21)

// check if syntax is correct
execute(
select(colBigDecimal)
.from(ThreeTestTable)
.orderBy(colBigDecimal)
).futureValue should be("-1.7976931348623157e308\n34.34\n9223372036854776000")
}
}
4 changes: 2 additions & 2 deletions dsl/src/test/scala/com/crobox/clickhouse/TestSchema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ trait TestSchema {
case object ThreeTestTable extends Table {
override lazy val database: String = _db
override val name: String = "threeTestTable"
override val columns: List[NativeColumn[_]] = List(itemId, col2, col4, col5, col6, bigDecimal)
override val columns: List[NativeColumn[_]] = List(itemId, col2, col4, col5, col6, colBigDecimal)
}

val shieldId = NativeColumn[String]("shield_id")
Expand All @@ -58,7 +58,7 @@ trait TestSchema {
val col4 = NativeColumn[String]("column_4")
val col5 = NativeColumn[String]("column_5")
val col6 = NativeColumn[String]("column_6")
val bigDecimal = NativeColumn[BigDecimal]("column_bg", ColumnType.BigDecimal64)
val colBigDecimal = NativeColumn[BigDecimal]("column_bg", ColumnType.BigDecimal64)
val timestampColumn = NativeColumn[Long]("ts", ColumnType.UInt64)
val nativeUUID = NativeColumn[UUID]("uuid", ColumnType.UUID)

Expand Down

0 comments on commit 090c9fd

Please sign in to comment.