Skip to content

Commit

Permalink
212
Browse files Browse the repository at this point in the history
  • Loading branch information
kellen committed Aug 27, 2024
1 parent 641e87e commit 337d487
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions beam/src/main/scala/magnolify/beam/BeamSchemaType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,10 @@ object BeamSchemaField {
caseClass.construct(p => p.typeclass.fromAny(v.getValue[Any](p.index))(cm))

override def to(v: T)(cm: CaseMapper): Row = {
val values = caseClass.parameters.map(p => p.typeclass.to(p.dereference(v))(cm))
Row.withSchema(schema(cm)).addValues(values: _*).build()
val values = caseClass.parameters.map { p =>
p.typeclass.to(p.dereference(v))(cm).asInstanceOf[Object]
}
Row.withSchema(schema(cm)).addValues(values.asJava).build()
}
}
}
Expand Down

0 comments on commit 337d487

Please sign in to comment.