implicit class SchemaImprovement extends AnyRef
- Alphabetic
- By Inheritance
- SchemaImprovement
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SchemaImprovement(schema: Schema)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
flat: Either[AvroSchemaError, Schema]
Converts the schema to its flatten version.
Converts the schema to its flatten version. It supports primitives, arrays and nested complex data structures.
Rules:
- If a primitive, keeps it as is - If a record, flatten all the fields so that they become primitive. Then appends the field name to the children's field name and use their type as the output type. For example,
{ "type": "record", "name": "PaymentRecord", "fields": [ { "name": "paymentView", "type": "record", "name": "PaymentView", "fields": [ { "name": "payment", "type": "long" }, { "name": "revoked", "type": ["null", "boolean"], "default": null }, ] } ] }becomes
{ "type": "record", "name": "PaymentRecord", "fields": [ { "name": "paymentView_payment", "type": "long" }, { "name": "paymentView_revoked", type": ["null", "boolean"], "default": null } ] }- If an array, it first makes sure that the type is a primitive with any flattening rule and then use it as the output. As an array could be empty, regardless of being optional or not, we always set the fields as optional. An array, in the process of flattening will cause an explosion.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
getTypeWithoutNull: Either[NonNullableUnionTypeError, Schema]
In case of a nullable schema, it returns the type if it's not null.
In case of a nullable schema, it returns the type if it's not null. A nullable schema in Avro is the
UNIONofNULLand the actual type. In this method, we assume that there is no more than one type (besidesNULL) in the union. - final def getTypesWithoutNull: Schema
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isArray: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def isRecord: Boolean
-
final
def
makeNullable: Schema
If schema is not nullable, it will make it nullable with a default value of 'null'
- final def mergeWith(otherSchema: Schema): Schema
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- final def toIdl(protocol: String): Either[IllegalOperationError, String]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
union(other: Schema): Schema
Union of two schema It makes sure that the "null" schema comes first.
Union of two schema It makes sure that the "null" schema comes first. But if both of them are null, it returns only one of them. Otherwise, returns the union of the types of both schema.
- Annotations
- @tailrec()
-
def
unionWithNonUnion(nonUnion: Schema): Schema
Union with a non-union assuming this schema is a union itself
- def unionWithUnion(union: Schema): Schema
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()