-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'steve-e-issue-190-fixedtype-nameclash-fqn'
- Loading branch information
Showing
16 changed files
with
145 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"type": "record", | ||
"name": "FixedTwo", | ||
"namespace": "fixedtwo", | ||
"fields": [ | ||
{ | ||
"name": "first", | ||
"type": { | ||
"type": "fixed", | ||
"name": "fixed", | ||
"namespace": "fixedtwo.one", | ||
"size": 16 | ||
} | ||
}, | ||
{ | ||
"name": "second", | ||
"type": { | ||
"type": "fixed", | ||
"name": "fixed", | ||
"namespace": "fixedtwo.two", | ||
"size": 16 | ||
} | ||
} | ||
] | ||
} |
36 changes: 36 additions & 0 deletions
36
avrohugger-core/src/test/expected/specific/example/fixedtwo/FixedTwo.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ | ||
package fixedtwo | ||
|
||
import scala.annotation.switch | ||
|
||
final case class FixedTwo(var first: fixedtwo.one.fixed, var second: fixedtwo.two.fixed) extends org.apache.avro.specific.SpecificRecordBase { | ||
def this() = this(fixedtwo.one.fixed(Array()), fixedtwo.two.fixed(Array())) | ||
def get(field$: Int): AnyRef = { | ||
(field$: @switch) match { | ||
case 0 => { | ||
first | ||
}.asInstanceOf[AnyRef] | ||
case 1 => { | ||
second | ||
}.asInstanceOf[AnyRef] | ||
case _ => new org.apache.avro.AvroRuntimeException("Bad index") | ||
} | ||
} | ||
def put(field$: Int, value: Any): Unit = { | ||
(field$: @switch) match { | ||
case 0 => this.first = { | ||
value | ||
}.asInstanceOf[fixedtwo.one.fixed] | ||
case 1 => this.second = { | ||
value | ||
}.asInstanceOf[fixedtwo.two.fixed] | ||
case _ => new org.apache.avro.AvroRuntimeException("Bad index") | ||
} | ||
() | ||
} | ||
def getSchema: org.apache.avro.Schema = fixedtwo.FixedTwo.SCHEMA$ | ||
} | ||
|
||
object FixedTwo { | ||
val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"FixedTwo\",\"namespace\":\"fixedtwo\",\"fields\":[{\"name\":\"first\",\"type\":{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"fixedtwo.one\",\"size\":16}},{\"name\":\"second\",\"type\":{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"fixedtwo.two\",\"size\":16}}]}") | ||
} |
24 changes: 24 additions & 0 deletions
24
avrohugger-core/src/test/expected/specific/example/fixedtwo/one/fixed.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ | ||
package fixedtwo.one | ||
|
||
final case class fixed() extends org.apache.avro.specific.SpecificFixed { | ||
def getSchema: org.apache.avro.Schema = fixedtwo.one.fixed.SCHEMA$ | ||
def readExternal(in: java.io.ObjectInput): Unit = { | ||
fixedtwo.one.fixed.READER$.read(this, org.apache.avro.specific.SpecificData.getDecoder(in)) | ||
() | ||
} | ||
def writeExternal(out: java.io.ObjectOutput): Unit = { | ||
fixedtwo.one.fixed.WRITER$.write(this, org.apache.avro.specific.SpecificData.getEncoder(out)) | ||
} | ||
} | ||
|
||
object fixed { | ||
val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"fixedtwo.one\",\"size\":16}") | ||
val READER$ = new org.apache.avro.specific.SpecificDatumReader[fixed](fixedtwo.one.fixed.SCHEMA$) | ||
val WRITER$ = new org.apache.avro.specific.SpecificDatumWriter[fixed](fixedtwo.one.fixed.SCHEMA$) | ||
def apply(data: Array[Byte]): fixed = { | ||
val fixed = new fixedtwo.one.fixed() | ||
fixed.bytes(data) | ||
fixed | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
avrohugger-core/src/test/expected/specific/example/fixedtwo/two/fixed.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ | ||
package fixedtwo.two | ||
|
||
final case class fixed() extends org.apache.avro.specific.SpecificFixed { | ||
def getSchema: org.apache.avro.Schema = fixedtwo.two.fixed.SCHEMA$ | ||
def readExternal(in: java.io.ObjectInput): Unit = { | ||
fixedtwo.two.fixed.READER$.read(this, org.apache.avro.specific.SpecificData.getDecoder(in)) | ||
() | ||
} | ||
def writeExternal(out: java.io.ObjectOutput): Unit = { | ||
fixedtwo.two.fixed.WRITER$.write(this, org.apache.avro.specific.SpecificData.getEncoder(out)) | ||
} | ||
} | ||
|
||
object fixed { | ||
val SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"fixed\",\"name\":\"fixed\",\"namespace\":\"fixedtwo.two\",\"size\":16}") | ||
val READER$ = new org.apache.avro.specific.SpecificDatumReader[fixed](fixedtwo.two.fixed.SCHEMA$) | ||
val WRITER$ = new org.apache.avro.specific.SpecificDatumWriter[fixed](fixedtwo.two.fixed.SCHEMA$) | ||
def apply(data: Array[Byte]): fixed = { | ||
val fixed = new fixedtwo.two.fixed() | ||
fixed.bytes(data) | ||
fixed | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
avrohugger-core/src/test/expected/standard/example/logical/LogicalSc.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ | ||
package example.logical | ||
|
||
final case class LogicalSc(data: BigDecimal, fxField: fxType, ts: java.time.Instant, dt: java.time.LocalDate, uuid: java.util.UUID, dataBig: BigDecimal, tm: java.time.LocalTime, timeMicros: java.time.LocalTime, timestampMicros: java.time.ZonedDateTime, localTimestampMicros: java.time.LocalDateTime, localTimestampMillis: java.time.LocalDateTime) | ||
final case class LogicalSc(data: BigDecimal, fxField: example.logical.fxType, ts: java.time.Instant, dt: java.time.LocalDate, uuid: java.util.UUID, dataBig: BigDecimal, tm: java.time.LocalTime, timeMicros: java.time.LocalTime, timestampMicros: java.time.ZonedDateTime, localTimestampMicros: java.time.LocalDateTime, localTimestampMillis: java.time.LocalDateTime) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
avrohugger-core/src/test/expected/standard/example/sharecord/HashRecord.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** MACHINE-GENERATED FROM AVRO SCHEMA. DO NOT EDIT DIRECTLY */ | ||
package example.sharecord | ||
|
||
final case class HashRecord(my_hash: Sha256) | ||
final case class HashRecord(my_hash: example.sharecord.Sha256) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.9.7 | ||
sbt.version=1.9.8 |