-
Notifications
You must be signed in to change notification settings - Fork 526
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
for example, BigQueryType[NestedWrapper] for this code:
object Schema {
@BigQueryType.toTable
case class Base(
events: List[Nested] = Nil
)
case class Nested(
sibling: NestedWrapper
)
case class NestedWrapper(
sibling: Sibling // this is where it breaks
)
case class Sibling()
}generates a code block that redefines val result:
blackbox typecheck (against pt = com.spotify.concertdistribution.Schema.Base => org.apache.avro.generic.GenericRecord): (((r: com.spotify.concertdistribution.Schema.Base) => {
import _root_.scala.jdk.javaapi.CollectionConverters._;
{
val result = {
import _root_.scala.jdk.CollectionConverters._;
val recordSchema = _root_.com.spotify.scio.bigquery.types.BigQueryType.avroSchemaOf[com.spotify.concertdistribution.Schema.Base];
new _root_.org.apache.avro.generic.GenericRecordBuilder(_root_.org.apache.avro.Schema.createRecord("Base", recordSchema.getDoc, recordSchema.getNamespace, recordSchema.isError, recordSchema.getFields.asScala.map(((f) => new _root_.org.apache.avro.Schema.Field(f.name(), f.schema(), f.doc(), f.defaultVal()))).asJava))
};
result.set("repeat", {
val rrepeat = r.repeat;
{
val result = {
import _root_.scala.jdk.CollectionConverters._;
val recordSchema = _root_.com.spotify.scio.bigquery.types.BigQueryType.avroSchemaOf[com.spotify.concertdistribution.Schema.Level1 @com.spotify.scio.bigquery.types.BigQueryTag];
new _root_.org.apache.avro.generic.GenericRecordBuilder(_root_.org.apache.avro.Schema.createRecord("repeat", recordSchema.getDoc, recordSchema.getNamespace, recordSchema.isError, recordSchema.getFields.asScala.map(((f) => new _root_.org.apache.avro.Schema.Field(f.name(), f.schema(), f.doc(), f.defaultVal()))).asJava))
};
...
and results in the compilation error recursive value rsibling needs type
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working