Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(datahub-client): new tests for the AvroSchemaConverter #12087

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"type": "record",
"name": "ArrayType",
"fields": [
{
"name": "arrayOfString",
"type": {
"type": "array",
"items": "string"
}
},
{
"name": "arrayOfMap",
"type": {
"type": "array",
"items": {
"type": "map",
"values": "string"
}
}
},
{
"name": "arrayOfRecord",
"type": {
"type": "array",
"items": {
"type": "record",
"name": "ComplexType",
"fields": [
{
"name": "field1",
"type": "string"
},
{
"name": "field2",
"type": "int"
}
]
}
}
},
{
"name": "arrayOfArray",
"type": {
"type": "array",
"items": {
"type": "array",
"items": "string"
}
}
},
{
"name": "arrayOfUnion",
"type": {
"type": "array",
"items": ["string", "int", "boolean"]
}
},
{
"name": "arrayOfNullableString",
"type": {
"type": "array",
"items": ["null", "string"]
}
},
{
"name": "arrayOfNullableRecord",
"type": {
"type": "array",
"items": ["null", {
"type": "record",
"name": "ComplexTypeNullable",
"fields": [
{
"name": "field1",
"type": "string"
},
{
"name": "field2",
"type": "int"
}
]
}]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"type": "record",
"name": "MapType",
"fields": [
{
"name": "mapOfString",
"type": {
"type": "map",
"values": "string"
}
},
{
"name": "mapOfComplexType",
"type": {
"type": "map",
"values": {
"type": "record",
"name": "ComplexType",
"fields": [
{
"name": "field1",
"type": "string"
},
{
"name": "field2",
"type": "int"
}
]
}
}
},
{
"name": "mapOfNullableString",
"type": {
"type": "map",
"values": ["null", "string"]
}
},
{
"name": "mapOfNullableComplexType",
"type": {
"type": "map",
"values": ["null", {
"type": "record",
"name": "ComplexTypeNullable",
"fields": [
{
"name": "field1",
"type": "string"
},
{
"name": "field2",
"type": "int"
}
]
}]
}
},
{
"name": "mapOfArray",
"type": {
"type": "map",
"values": {
"type": "array",
"items": "string"
}
}
},
{
"name": "mapOfMap",
"type": {
"type": "map",
"values": {
"type": "map",
"values": "int"
}
}
},
{
"name": "mapOfUnion",
"type": {
"type": "map",
"values": ["null", "string", "int"]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"type": "record",
"name": "StructType",
"fields": [
{
"name": "structField",
"type": {
"type": "record",
"name": "ComplexStruct",
"fields": [
{
"name": "fieldString",
"type": "string"
},
{
"name": "fieldInt",
"type": "int"
},
{
"name": "fieldBoolean",
"type": "boolean"
},
{
"name": "fieldMap",
"type": {
"type": "map",
"values": "string"
}
},
{
"name": "fieldRecord",
"type": {
"type": "record",
"name": "NestedRecord",
"fields": [
{
"name": "nestedField1",
"type": "string"
},
{
"name": "nestedField2",
"type": "int"
}
]
}
},
{
"name": "fieldArray",
"type": {
"type": "array",
"items": "string"
}
},
{
"name": "fieldUnion",
"type": [
"null",
"string",
"int"
]
},
{
"name": "fieldNullableMap",
"type": [
"null",
{
"type": "map",
"values": "string"
}
]
}
]
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"type": "record",
"name": "UnionType",
"fields": [
{
"name": "fieldUnionNullablePrimitives",
"type": [
"null",
"string",
"int",
"boolean"
]
},
{
"name": "fieldUnionComplexTypes",
"type": [
"null",
{
"type": "record",
"name": "NestedRecord",
"fields": [
{
"name": "nestedField1",
"type": "string"
},
{
"name": "nestedField2",
"type": "int"
}
]
},
{
"type": "map",
"values": "string"
}
]
},
{
"name": "fieldUnionPrimitiveAndComplex",
"type": [
"null",
"string",
{
"type": "record",
"name": "ComplexTypeRecord",
"fields": [
{
"name": "complexField1",
"type": "string"
},
{
"name": "complexField2",
"type": "int"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"type": "record",
"name": "LogicalTypes",
"fields": [
{
"name": "decimalField",
"type": {
"type": "bytes",
"logicalType": "decimal",
"precision": 9,
"scale": 2
}
},
{
"name": "decimalFieldWithoutScale",
"type": {
"type": "bytes",
"logicalType": "decimal",
"precision": 9
}
},
{
"name": "decimalFieldWithoutPrecisionAndScale",
"type": {
"type": "bytes",
"logicalType": "decimal"
}
},
{
"name": "timestampMillisField",
"type": {
"type": "long",
"logicalType": "timestamp-millis"
}
},
{
"name": "timestampMicrosField",
"type": {
"type": "long",
"logicalType": "timestamp-micros"
}
},
{
"name": "dateField",
"type": {
"type": "int",
"logicalType": "date"
}
},
{
"name": "timeMillisField",
"type": {
"type": "int",
"logicalType": "time-millis"
}
},
{
"name": "timeMicrosField",
"type": {
"type": "long",
"logicalType": "time-micros"
}
},
{
"name": "uuidField",
"type": {
"type": "string",
"logicalType": "uuid"
}
}
]
}
Loading
Loading