Neville Li

Results 45 comments of Neville Li

Should be doable, although there might be some ugly casts esp for nested/repeated fields?

Turns out the new 3 level list is more complex. With the default 2 level list, `myField: List[T]` is written as: ``` required group myField (LIST) { repeated T array;...

More on Avro `array` mapping. The following Avro fields `{"name": "field1", "type:" {"type": "array", "items": "string"}, "default": [] } // required array field that defaults to empty array` `{"name": "field2",...

This should be a simple map-only transformer over an `Array[Int]`.

Stumbled upon this one. Note that Java boxed primitives can be `null` though, so you might want `Arbitrary.arbitrary[Option[Int]].map(_.map(_.asInstanceOf[Integer].getOrElse(null)))` to cover that edge case.

Adding `import org.scalacheck.util.SerializableCanBuildFroms._` fixes the issue. Is it by design that they're not in scope?