Skip to content

Commit f1666dc

Browse files
committed
Prepare for release version 0.2.0.
1 parent a891038 commit f1666dc

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

doc/changes/changes_0.2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Import Export UDF Common Scala 0.2.0, released 2020-10-DD
1+
# Import Export UDF Common Scala 0.2.0, released 2020-10-30
22

33
## Features
44

src/main/scala/com/exasol/avro/AvroConverter.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,13 @@ final class AvroConverter {
176176
)
177177
}
178178

179+
// Avro Map key is either Utf8 or Java String type, both can be
180+
// converted to string.
181+
@SuppressWarnings(Array("org.wartremover.warts.ToString"))
179182
private[this] def getMapValue(map: Any, field: Schema): JMap[String, Any] = {
180183
val result = new java.util.HashMap[String, Any]()
181-
map.asInstanceOf[JMap[String, _]].forEach { (key, value) =>
182-
val _ = result.put(key, getAvroValue(value, field.getValueType()))
184+
map.asInstanceOf[JMap[_ <: java.lang.CharSequence, _]].forEach { (key, value) =>
185+
val _ = result.put(key.toString(), getAvroValue(value, field.getValueType()))
183186
}
184187
result
185188
}

src/test/scala/com/exasol/avro/AvroComplexTypesTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class AvroComplexTypesTest extends AnyFunSuite {
4747
s"""|{
4848
| "type": "record",
4949
| "namespace": "com.exasol.avro.Types",
50-
| "name": "MapRecord",
50+
| "name": "RecordRecord",
5151
| "fields": [
5252
| {"name": "id", "type":"int"},
5353
| $avroRecordType

src/test/scala/com/exasol/avro/AvroLogicalTypesTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class AvroLogicalTypesTest extends AnyFunSuite {
8787
"-2.31" -> "-2.31"
8888
)
8989

90-
test("parse avro bytes with decimal as big decimal type") {
90+
test("parse avro bytes with decimal as Java BigDecimal type") {
9191
val schema = getLogicalSchema(
9292
s"""|{
9393
| "type":"bytes",
@@ -107,7 +107,7 @@ class AvroLogicalTypesTest extends AnyFunSuite {
107107
}
108108
}
109109

110-
test("parse avro fixed with decimal as big decimal type") {
110+
test("parse avro fixed with decimal as Java BigDecimal type") {
111111
val schema = getLogicalSchema(
112112
s"""|{
113113
| "name":"fixed",

0 commit comments

Comments
 (0)