zio-quill
zio-quill copied to clipboard
CassandraSyncContext UDT doesn't support Option[List[String]]
Version: 3.8.0
Module: quill-cassandra
Actual behavior
case class MyUdt_optionList(col: Option[List[String]]) extends Udt
case class TableWith_optionList(c: MyUdt_optionList)
CassandraMirrorContext can compile, but CassandraSyncContext fails with
exception during macro expansion:
scala.reflect.macros.TypecheckException: Can't find implicit `Decoder[Playground.MyUdt_optionList]`.
Steps to reproduce the behavior
https://scastie.scala-lang.org/dev590t/DV5PLzFPTuOISvVnuElJzA/112
@getquill/maintainers
related #1742
I have found a commit about how Make UDT encoding to support options: #1266. And a other make UDT to support List fields" : #1229
Here is a other example that shows a different behavior between CassandraSyncContext and CassandraMirrorContext for the type Try[Int]
https://scastie.scala-lang.org/dev590t/DV5PLzFPTuOISvVnuElJzA/167
It seem the problem don't concern only Option[List[String]]
workaround add a Decoder[Option[List[String]]] don't solve the problem should add a Decoder for the udt containing field with Option[List[String]] https://scastie.scala-lang.org/dev590t/yIbvAomrTl64NqUswq4BlA