mirror of
https://github.com/microsoft/HybridRow.git
synced 2026-01-20 09:53:13 +00:00
Release 1.1.0-preview 3 (#6)
Release roll-up snapshot of C#/C++ codebase at version 1.1.0-preview. This release matches the current shipping nugets.
This commit is contained in:
96
experimental/java/test-data/BatchApiSchema.json
Normal file
96
experimental/java/test-data/BatchApiSchema.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"name": "Microsoft.Azure.Cosmos.BatchApi",
|
||||
"version": "v1",
|
||||
"schemas": [
|
||||
{
|
||||
"name": "BatchRequestHeaders",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "sampleRequestHeader",
|
||||
"type": { "type": "int64", "storage": "fixed" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BatchOperation",
|
||||
"id": 2,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "operationType",
|
||||
"type": { "type": "int32", "storage": "fixed" }
|
||||
}, {
|
||||
"path": "headers",
|
||||
"type": { "type": "schema", "name": "BatchRequestHeaders" }
|
||||
}, {
|
||||
"path": "resourceType",
|
||||
"type": { "type": "int32", "storage": "fixed" }
|
||||
}, {
|
||||
"path": "resourcePath",
|
||||
"type": { "type": "utf8", "storage": "variable", "length": 1024 }
|
||||
}, {
|
||||
"path": "resourceBody",
|
||||
"type": { "type": "binary", "storage": "variable" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BatchRequest",
|
||||
"id": 3,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "operations",
|
||||
"type": { "type": "array", "items": { "type": "schema", "name": "BatchOperation" } }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BatchResponseHeaders",
|
||||
"id": 4,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "sampleResponseHeader",
|
||||
"type": { "type": "utf8", "storage": "variable", "length": 1024 }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BatchOperationResponse",
|
||||
"id": 5,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "statusCode",
|
||||
"type": { "type": "int32", "storage": "fixed" }
|
||||
}, {
|
||||
"path": "headers",
|
||||
"type": { "type": "schema", "name": "BatchResponseHeaders" }
|
||||
}, {
|
||||
"path": "resourceBody",
|
||||
"type": { "type": "binary", "storage": "variable" }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "BatchResponse",
|
||||
"id": 6,
|
||||
"type": "schema",
|
||||
"properties":
|
||||
[
|
||||
{
|
||||
"path": "operations",
|
||||
"type": { "type": "array", "items": { "type": "schema", "name": "BatchOperationResponse" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
211
experimental/java/test-data/CoverageSchema.json
Normal file
211
experimental/java/test-data/CoverageSchema.json
Normal file
@@ -0,0 +1,211 @@
|
||||
{
|
||||
"schemas": [
|
||||
{
|
||||
"name": "myUDT", // Question: what should the namespace/structure of schema identifiers.
|
||||
"id": 1,
|
||||
"type": "schema", // Optional: implied at the top-level (only "schema" types can be defined at the root of schemas)
|
||||
"options": {
|
||||
"disallowUnschematized": false // Optional: defaults to false
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"path": "a",
|
||||
"type": {
|
||||
"type": "int8",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "b",
|
||||
"type": {
|
||||
"type": "utf8",
|
||||
"storage": "variable"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "someTable",
|
||||
"id": -1,
|
||||
"options": {
|
||||
"disallowUnschematized": true
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"path": "myBool",
|
||||
"comment": "A sample fixed boolean column",
|
||||
"type": {
|
||||
"type": "bool",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "myInt8",
|
||||
"comment": "A sample fixed 8-byte integer column",
|
||||
"type": {
|
||||
"type": "int8",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nested.x",
|
||||
"comment": "A sample nested integer column",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nested.y",
|
||||
"comment": "A sample nested float column",
|
||||
"type": {
|
||||
"type": "float32",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nested.deeper.z",
|
||||
"comment": "A sample deeper nested double column",
|
||||
"type": {
|
||||
"type": "float64",
|
||||
"storage": "fixed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "State",
|
||||
"comment": "A sample fixed 2-byte UTF-8 encoded text column",
|
||||
"type": {
|
||||
"type": "utf8",
|
||||
"storage": "fixed",
|
||||
"length": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "myString",
|
||||
"comment": "A sample variable length UTF-8 encoded text column (up to 127 bytes)",
|
||||
"type": {
|
||||
"type": "utf8",
|
||||
"storage": "variable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "lob",
|
||||
"comment": "A sample extended UTF-8 encoded text column (up to 2M bytes)",
|
||||
"type": {
|
||||
"type": "utf8",
|
||||
"storage": "sparse"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "canbelob",
|
||||
"comment":
|
||||
"A sample extended UTF-8 encoded text column (up to 2M bytes) that stores variable if 'small' (<127 bytes), but sparse if 'large'",
|
||||
"type": {
|
||||
"type": "utf8",
|
||||
"storage": "variable"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "primitiveArray",
|
||||
"comment": "A sample array of primitives (4-byte ints)",
|
||||
"type": { "type": "array", "items": { "type": "int32" } }
|
||||
},
|
||||
{
|
||||
"path": "shreddedArray[0]",
|
||||
"comment": "A sample fixed-length array of primitives",
|
||||
"type": { "type": "int32" }
|
||||
},
|
||||
{
|
||||
"path": "shreddedArray[1]",
|
||||
"comment": "A sample fixed-length array of primitives",
|
||||
"type": { "type": "int32" }
|
||||
},
|
||||
{
|
||||
"path": "nestedArray",
|
||||
"comment": "A sample array of nested arrays",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": { "type": "int32" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nestedNestedArray",
|
||||
"comment": "A sample array of nested nested arrays",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": { "type": "int32" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "arrayOfObject",
|
||||
"comment": "A sample array of semi-structured objects",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{
|
||||
"path": "a",
|
||||
"type": { "type": "int8" }
|
||||
},
|
||||
{
|
||||
"path": "b",
|
||||
"type": { "type": "utf8" }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "arrayOfAny",
|
||||
"comment": "A sample heterogenous array",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": { "type": "any" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "arrayOfUDT",
|
||||
"comment": "A sample array of schematized rows",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "schema",
|
||||
"name": "myUDT" // see definition above - should this be called $ref or ref or something?
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nestedObject",
|
||||
"comment": "A sample nested objects",
|
||||
"type": {
|
||||
"type": "object",
|
||||
"properties": [
|
||||
{
|
||||
"path": "a",
|
||||
"type": {
|
||||
"type": "int8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "b",
|
||||
"type": {
|
||||
"type": "utf8"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
8
experimental/java/test-data/CrossVersioningExpected.json
Normal file
8
experimental/java/test-data/CrossVersioningExpected.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"CrossVersionFixed": "8101000000FFFF1FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA3E555555555555D53F2A00000000000000000000000000000000001C00CA44C50A55555505CB00B714006E39578A01D6082A00000000000000B9259C2A2E921146BB0A244A9496503C2A0000000000000000000000616263000102",
|
||||
"CrossVersionNullFixed": "810100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
"CrossVersionVariable": "81020000000FADD5AAD5AAD5AAD5AA01AAD5AAD5AAD5AAD5AA010361626303000102",
|
||||
"CrossVersionNullVariable": "810200000000",
|
||||
"CrossVersionSparse": "8103000000010103020503AA0604AAAA0705AAAAAAAA0806AAAAAAAAAAAAAAAA0907AA0A08AAAA0B09AAAAAAAA0C0AAAAAAAAAAAAAAAAA0F0BABAAAA3E100C555555555555D53F160D2A000000000000000000000000000000110E00001C00CA44C50A55555505CB00B714120F006E39578A01D60817102A000000000000001311B9259C2A2E921146BB0A244A9496503C18122A000000000000000000000014130361626315140300010222051503000000AAAAAA22220F1602000000030000000000803F0000004000004040030000000000803F00000040000040402214170300000003616263036465660368696A26020D0818ADD5AAD5AAD5AAD5AA01AAAAAAAAAAAAAAAA260201260205051901AAAA26020344040000001A02030100000002000000462E141B03000000036162630365666703787A792E22051C030000000300000001020303000000040506030000000708092E2E071D030000000300000001000000020000000300000003000000040000000500000006000000030000000700000008000000090000002E44040000001E030000000301000000020000004603030000000400000046030500000006000000462A14141F02000000044D61726B044C756B65084861727269736F6E0348616E2A0522052002000000010300000001020302030000000405062A062A0707210200000001000200000001000000020000000300000004000000020002000000050000000600000007000000080000002A1044040000002203000000000000000000004003030000000400000046000000000000084003050000000600000046000000000000F03F03010000000200000046",
|
||||
"CrossVersionNullSparse": "8103000000"
|
||||
}
|
||||
127
experimental/java/test-data/CrossVersioningSchema.json
Normal file
127
experimental/java/test-data/CrossVersioningSchema.json
Normal file
@@ -0,0 +1,127 @@
|
||||
// Set of types used in the cross versioning tests.
|
||||
{
|
||||
"schemas": [
|
||||
{ "name": "Fixed", "id": 1, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "null", "type": { "type": "null", "storage": "fixed" } },
|
||||
{ "path": "bool", "type": { "type": "bool", "storage": "fixed" } },
|
||||
{ "path": "int8", "type": { "type": "int8", "storage": "fixed" } },
|
||||
{ "path": "int16", "type": { "type": "int16", "storage": "fixed" } },
|
||||
{ "path": "int32", "type": { "type": "int32", "storage": "fixed" } },
|
||||
{ "path": "int64", "type": { "type": "int64", "storage": "fixed" } },
|
||||
{ "path": "uint8", "type": { "type": "uint8", "storage": "fixed" } },
|
||||
{ "path": "uint16", "type": { "type": "uint16", "storage": "fixed" } },
|
||||
{ "path": "uint32", "type": { "type": "uint32", "storage": "fixed" } },
|
||||
{ "path": "uint64", "type": { "type": "uint64", "storage": "fixed" } },
|
||||
{ "path": "float32", "type": { "type": "float32", "storage": "fixed" } },
|
||||
{ "path": "float64", "type": { "type": "float64", "storage": "fixed" } },
|
||||
{ "path": "float128", "type": { "type": "float128", "storage": "fixed" } },
|
||||
{ "path": "decimal", "type": { "type": "decimal", "storage": "fixed" } },
|
||||
{ "path": "datetime", "type": { "type": "datetime", "storage": "fixed" } },
|
||||
{ "path": "unixdatetime", "type": { "type": "unixdatetime", "storage": "fixed" } },
|
||||
{ "path": "guid", "type": { "type": "guid", "storage": "fixed" } },
|
||||
{ "path": "mongodbobjectid", "type": { "type": "mongodbobjectid", "storage": "fixed" } },
|
||||
{ "path": "utf8", "type": { "type": "utf8", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "binary", "type": { "type": "binary", "storage": "fixed", "length": 3 } }
|
||||
]},
|
||||
{ "name": "Variable", "id": 2, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "varint", "type": { "type": "varint", "storage": "variable" } },
|
||||
{ "path": "varuint", "type": { "type": "varuint", "storage": "variable" } },
|
||||
{ "path": "utf8", "type": { "type": "utf8", "storage": "variable"} },
|
||||
{ "path": "binary", "type": { "type": "binary", "storage": "variable" } }
|
||||
]},
|
||||
{ "name": "Sparse", "id": 3, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "null", "type": { "type": "null" } },
|
||||
{ "path": "bool", "type": { "type": "bool" } },
|
||||
{ "path": "int8", "type": { "type": "int8" } },
|
||||
{ "path": "int16", "type": { "type": "int16" } },
|
||||
{ "path": "int32", "type": { "type": "int32" } },
|
||||
{ "path": "int64", "type": { "type": "int64" } },
|
||||
{ "path": "uint8", "type": { "type": "uint8" } },
|
||||
{ "path": "uint16", "type": { "type": "uint16" } },
|
||||
{ "path": "uint32", "type": { "type": "uint32" } },
|
||||
{ "path": "uint64", "type": { "type": "uint64" } },
|
||||
{ "path": "float32", "type": { "type": "float32" } },
|
||||
{ "path": "float64", "type": { "type": "float64" } },
|
||||
{ "path": "float128", "type": { "type": "float128" } },
|
||||
{ "path": "decimal", "type": { "type": "decimal" } },
|
||||
{ "path": "datetime", "type": { "type": "datetime" } },
|
||||
{ "path": "unixdatetime", "type": { "type": "unixdatetime" } },
|
||||
{ "path": "guid", "type": { "type": "guid" } },
|
||||
{ "path": "mongodbobjectid", "type": { "type": "mongodbobjectid" } },
|
||||
{ "path": "utf8", "type": { "type": "utf8" } },
|
||||
{ "path": "binary", "type": { "type": "binary" } },
|
||||
{ "path": "array_t<int8>", "type": {
|
||||
"type": "array",
|
||||
"items": { "type": "int8", "nullable": false }
|
||||
} },
|
||||
{ "path": "array_t<array_t<float32>>", "type": {
|
||||
"type": "array",
|
||||
"items": { "type": "array", "nullable": false, "items": { "type": "float32", "nullable": false } }
|
||||
} },
|
||||
{ "path": "array_t<utf8>", "type": { "type": "array", "items": { "type": "utf8", "nullable": false } } },
|
||||
{ "path": "tuple<varint,int64>", "type": {
|
||||
"type": "tuple",
|
||||
"items": [ { "type": "varint", "nullable": false }, { "type": "int64", "nullable": false }]
|
||||
} },
|
||||
{ "path": "tuple<null,tuple<int8,int8>>", "type": {
|
||||
"type": "tuple", "items": [
|
||||
{ "type": "null", "nullable": false },
|
||||
{ "type": "tuple", "nullable": false, "items": [ { "type": "int8", "nullable": false }, { "type": "int8", "nullable": false } ] }
|
||||
]}},
|
||||
{ "path": "tuple<bool,udt>", "type": {
|
||||
"type": "tuple", "items": [
|
||||
{ "type": "bool", "nullable": false },
|
||||
{ "type": "schema", "name": "Point", "nullable": false}
|
||||
]}},
|
||||
{ "path": "set_t<utf8>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "utf8", "nullable": false }
|
||||
} },
|
||||
{ "path": "set_t<array_t<int8>>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "array", "nullable": false, "items": { "type": "int8", "nullable": false } }
|
||||
} },
|
||||
{ "path": "set_t<set_t<int32>>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "set", "nullable": false, "items": { "type": "int32", "nullable": false } }
|
||||
} },
|
||||
{ "path": "set_t<udt>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "schema", "name": "Point", "nullable": false}
|
||||
} },
|
||||
{ "path": "map_t<utf8,utf8>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "utf8", "nullable": false },
|
||||
"values": { "type": "utf8", "nullable": false }
|
||||
} },
|
||||
{ "path": "map_t<int8,array_t<int8>>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "int8", "nullable": false },
|
||||
"values": { "type": "array", "nullable": false, "items": { "type": "int8", "nullable": false } }
|
||||
} },
|
||||
{ "path": "map_t<int16,map_t<int32,int32>>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "int16", "nullable": false },
|
||||
"values": {
|
||||
"type": "map",
|
||||
"nullable": false,
|
||||
"keys": { "type": "int32", "nullable": false },
|
||||
"values": { "type": "int32", "nullable": false }
|
||||
}
|
||||
} },
|
||||
{ "path": "map_t<float64,udt>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "float64", "nullable": false },
|
||||
"values": { "type": "schema", "name": "Point", "nullable": false}
|
||||
} }
|
||||
]},
|
||||
{ "name": "Point", "id": 4, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "x", "type": { "type": "int32", "storage": "fixed" } },
|
||||
{ "path": "y", "type": { "type": "int32", "storage": "fixed" } }
|
||||
]}
|
||||
]
|
||||
}
|
||||
76
experimental/java/test-data/CustomerSchema.json
Normal file
76
experimental/java/test-data/CustomerSchema.json
Normal file
@@ -0,0 +1,76 @@
|
||||
// Partial implementation of Cassandra Hotel Schema described here::
|
||||
// https://www.oreilly.com/ideas/cassandra-data-modeling
|
||||
{
|
||||
"name": "Microsoft.Azure.Cosmos.Serialization.HybridRow.Tests.Unit.CustomerSchema",
|
||||
"schemas": [
|
||||
{
|
||||
"name": "PostalCode",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "zip", "type": { "type": "int32", "storage": "fixed" } },
|
||||
{ "path": "plus4", "type": { "type": "int16", "storage": "sparse" } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Address",
|
||||
"id": 2,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "street", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "city", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "state", "type": { "type": "utf8", "storage": "fixed", "length": 2 } },
|
||||
{ "path": "postal_code", "type": { "type": "schema", "name": "PostalCode" } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Hotels",
|
||||
"id": 3,
|
||||
"type": "schema",
|
||||
"partitionkeys": [{ "path": "hotel_id" }],
|
||||
"properties": [
|
||||
{ "path": "hotel_id", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "name", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "phone", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "address", "type": { "type": "schema", "name": "Address", "immutable": true } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Available_Rooms_By_Hotel_Date",
|
||||
"id": 4,
|
||||
"type": "schema",
|
||||
"partitionkeys": [{ "path": "hotel_id" }],
|
||||
"primarykeys": [{ "path": "date" }, { "path": "room_number", "direction": "desc" }],
|
||||
"properties": [
|
||||
{ "path": "hotel_id", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "date", "type": { "type": "datetime", "storage": "fixed" } },
|
||||
{ "path": "room_number", "type": { "type": "uint8", "storage": "fixed" } },
|
||||
{ "path": "is_available", "type": { "type": "bool" } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Guests",
|
||||
"id": 5,
|
||||
"type": "schema",
|
||||
"partitionkeys": [{ "path": "guest_id" }],
|
||||
"primarykeys": [{ "path": "first_name" }, { "path": "phone_numbers", "direction": "desc" }],
|
||||
"properties": [
|
||||
{ "path": "guest_id", "type": { "type": "guid", "storage": "fixed" } },
|
||||
{ "path": "first_name", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "last_name", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "title", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "emails", "type": { "type": "array", "items": { "type": "utf8", "nullable": false } } },
|
||||
{ "path": "phone_numbers", "type": { "type": "array", "items": { "type": "utf8", "nullable": false } } },
|
||||
{
|
||||
"path": "addresses",
|
||||
"type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "utf8", "nullable": false },
|
||||
"values": { "type": "schema", "name": "Address", "immutable": true, "nullable": false }
|
||||
}
|
||||
},
|
||||
{ "path": "confirm_number", "type": { "type": "utf8", "storage": "variable" } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
40
experimental/java/test-data/MovieSchema.json
Normal file
40
experimental/java/test-data/MovieSchema.json
Normal file
@@ -0,0 +1,40 @@
|
||||
// Todo demo schema that utilizes typed maps.
|
||||
{
|
||||
"schemas": [
|
||||
{ "name": "Movie", "id": 1, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "cast", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "utf8", "nullable": false },
|
||||
"values": { "type": "utf8", "nullable": false }
|
||||
} },
|
||||
{ "path": "stats", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "guid", "nullable": false },
|
||||
"values": { "type": "float64", "nullable": false }
|
||||
} },
|
||||
{ "path": "related", "type": {
|
||||
"comment": "map: actor -> { map: moveId -> roleName }",
|
||||
"type": "map",
|
||||
"keys": { "type": "utf8", "nullable": false },
|
||||
"values": {
|
||||
"type": "map",
|
||||
"nullable": false,
|
||||
"keys": { "type": "int64", "nullable": false },
|
||||
"values": { "type": "utf8", "nullable": false }
|
||||
}
|
||||
} },
|
||||
{ "path": "revenue", "type": {
|
||||
"comment": "map: releaseDate -> Earnings }",
|
||||
"type": "map",
|
||||
"keys": { "type": "datetime", "nullable": false },
|
||||
"values": { "type": "schema", "name": "Earnings", "nullable": false }
|
||||
} }
|
||||
]},
|
||||
{ "name": "Earnings", "id": 2, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "domestic", "type": { "type": "decimal", "storage": "fixed" } },
|
||||
{ "path": "worldwide", "type": { "type": "decimal", "storage": "fixed" } }
|
||||
]}
|
||||
]
|
||||
}
|
||||
26
experimental/java/test-data/NullableSchema.json
Normal file
26
experimental/java/test-data/NullableSchema.json
Normal file
@@ -0,0 +1,26 @@
|
||||
// Demo schema that utilizes nullable typed scopes.
|
||||
{
|
||||
"schemas": [
|
||||
{
|
||||
"name": "Nullables",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "nullbool", "type": { "type": "array", "items": { "type": "bool" } } },
|
||||
{ "path": "nullset", "type": { "type": "set", "items": { "type": "utf8" } } },
|
||||
{ "path": "nullarray", "type": { "type": "array", "items": { "type": "float32" } } },
|
||||
{
|
||||
"path": "nulltuple",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": { "type": "tuple", "nullable": false, "items": [{ "type": "int32" }, { "type": "int64" }] }
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nullmap",
|
||||
"type": { "type": "map", "keys": { "type": "guid" }, "values": { "type": "uint8" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
72
experimental/java/test-data/PerfCounterSchema.json
Normal file
72
experimental/java/test-data/PerfCounterSchema.json
Normal file
@@ -0,0 +1,72 @@
|
||||
// Performance Counter demo schema that utilizes tuples.
|
||||
{
|
||||
"schemas": [
|
||||
{
|
||||
"name": "Coord",
|
||||
"id": 2,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "lat", "type": { "type": "int64", "storage": "fixed" } },
|
||||
{ "path": "lng", "type": { "type": "int64", "storage": "fixed" } }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Counters",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"partitionkeys": [{ "path": "name" }],
|
||||
"properties": [
|
||||
{ "path": "name", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{
|
||||
"path": "value",
|
||||
"type": {
|
||||
"type": "tuple",
|
||||
"immutable": true,
|
||||
"items": [{ "type": "utf8", "nullable": false }, { "type": "int64", "nullable": false }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "minmeanmax",
|
||||
"type": {
|
||||
"type": "tuple",
|
||||
"immutable": true,
|
||||
"items": [
|
||||
{ "type": "utf8", "nullable": false },
|
||||
{
|
||||
"type": "tuple",
|
||||
"nullable": false,
|
||||
"items": [
|
||||
{ "type": "int64", "nullable": false },
|
||||
{ "type": "int64", "nullable": false },
|
||||
{ "type": "int64", "nullable": false }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "coord",
|
||||
"type": {
|
||||
"type": "tuple",
|
||||
"immutable": true,
|
||||
"items": [{ "type": "utf8", "nullable": false }, { "type": "schema", "name": "Coord", "nullable": false }]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "CounterSet",
|
||||
"id": 3,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{
|
||||
"path": "history",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": { "type": "schema", "name": "Counters", "nullable": false }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
143
experimental/java/test-data/ReaderSchema.json
Normal file
143
experimental/java/test-data/ReaderSchema.json
Normal file
@@ -0,0 +1,143 @@
|
||||
// Set of types used in the IO tests.
|
||||
{
|
||||
"schemas": [
|
||||
{ "name": "Mixed", "id": 1, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "null", "type": { "type": "null", "storage": "fixed" } },
|
||||
{ "path": "bool", "type": { "type": "bool", "storage": "fixed" } },
|
||||
{ "path": "int8", "type": { "type": "int8", "storage": "fixed" } },
|
||||
{ "path": "int16", "type": { "type": "int16", "storage": "fixed" } },
|
||||
{ "path": "int32", "type": { "type": "int32", "storage": "fixed" } },
|
||||
{ "path": "int64", "type": { "type": "int64", "storage": "fixed" } },
|
||||
{ "path": "uint8", "type": { "type": "uint8", "storage": "fixed" } },
|
||||
{ "path": "uint16", "type": { "type": "uint16", "storage": "fixed" } },
|
||||
{ "path": "uint32", "type": { "type": "uint32", "storage": "fixed" } },
|
||||
{ "path": "uint64", "type": { "type": "uint64", "storage": "fixed" } },
|
||||
{ "path": "float32", "type": { "type": "float32", "storage": "fixed" } },
|
||||
{ "path": "float64", "type": { "type": "float64", "storage": "fixed" } },
|
||||
{ "path": "float128", "type": { "type": "float128", "storage": "fixed" } },
|
||||
{ "path": "decimal", "type": { "type": "decimal", "storage": "fixed" } },
|
||||
{ "path": "datetime", "type": { "type": "datetime", "storage": "fixed" } },
|
||||
{ "path": "unixdatetime", "type": { "type": "unixdatetime", "storage": "fixed" } },
|
||||
{ "path": "guid", "type": { "type": "guid", "storage": "fixed" } },
|
||||
{ "path": "mongodbobjectid", "type": { "type": "mongodbobjectid", "storage": "fixed" } },
|
||||
{ "path": "utf8", "type": { "type": "utf8", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "utf8_span", "type": { "type": "utf8", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "binary", "type": { "type": "binary", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "binary_span", "type": { "type": "binary", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "binary_sequence", "type": { "type": "binary", "storage": "fixed", "length": 3 } },
|
||||
{ "path": "var_varint", "type": { "type": "varint", "storage": "variable" } },
|
||||
{ "path": "var_varuint", "type": { "type": "varuint", "storage": "variable" } },
|
||||
{ "path": "var_utf8", "type": { "type": "utf8", "storage": "variable"} },
|
||||
{ "path": "var_utf8_span", "type": { "type": "utf8", "storage": "variable"} },
|
||||
{ "path": "var_binary", "type": { "type": "binary", "storage": "variable" } },
|
||||
{ "path": "var_binary_span", "type": { "type": "binary", "storage": "variable" } },
|
||||
{ "path": "var_binary_sequence", "type": { "type": "binary", "storage": "variable" } },
|
||||
{ "path": "sparse_null", "type": { "type": "null" } },
|
||||
{ "path": "sparse_bool", "type": { "type": "bool" } },
|
||||
{ "path": "sparse_int8", "type": { "type": "int8" } },
|
||||
{ "path": "sparse_int16", "type": { "type": "int16" } },
|
||||
{ "path": "sparse_int32", "type": { "type": "int32" } },
|
||||
{ "path": "sparse_int64", "type": { "type": "int64" } },
|
||||
{ "path": "sparse_uint8", "type": { "type": "uint8" } },
|
||||
{ "path": "sparse_uint16", "type": { "type": "uint16" } },
|
||||
{ "path": "sparse_uint32", "type": { "type": "uint32" } },
|
||||
{ "path": "sparse_uint64", "type": { "type": "uint64" } },
|
||||
{ "path": "sparse_float32", "type": { "type": "float32" } },
|
||||
{ "path": "sparse_float64", "type": { "type": "float64" } },
|
||||
{ "path": "sparse_float128", "type": { "type": "float128" } },
|
||||
{ "path": "sparse_decimal", "type": { "type": "decimal" } },
|
||||
{ "path": "sparse_datetime", "type": { "type": "datetime" } },
|
||||
{ "path": "sparse_unixdatetime", "type": { "type": "unixdatetime" } },
|
||||
{ "path": "sparse_guid", "type": { "type": "guid" } },
|
||||
{ "path": "sparse_mongodbobjectid", "type": { "type": "mongodbobjectid" } },
|
||||
{ "path": "sparse_utf8", "type": { "type": "utf8" } },
|
||||
{ "path": "sparse_utf8_span", "type": { "type": "utf8" } },
|
||||
{ "path": "sparse_binary", "type": { "type": "binary" } },
|
||||
{ "path": "sparse_binary_span", "type": { "type": "binary" } },
|
||||
{ "path": "sparse_binary_sequence", "type": { "type": "binary" } },
|
||||
{ "path": "array_t<int8>", "type": {
|
||||
"type": "array",
|
||||
"items": { "type": "int8", "nullable": false }
|
||||
} },
|
||||
{ "path": "array_t<array_t<float32>>", "type": {
|
||||
"type": "array",
|
||||
"items": { "type": "array", "nullable": false, "items": { "type": "float32", "nullable": false } }
|
||||
} },
|
||||
{ "path": "array_t<utf8>", "type": { "type": "array", "items": { "type": "utf8", "nullable": false } } },
|
||||
{ "path": "tuple<varint,int64>", "type": {
|
||||
"type": "tuple",
|
||||
"items": [ { "type": "varint", "nullable": false }, { "type": "int64", "nullable": false }]
|
||||
} },
|
||||
{ "path": "tuple<null,tuple<int8,int8>>", "type": {
|
||||
"type": "tuple", "items": [
|
||||
{ "type": "null", "nullable": false },
|
||||
{ "type": "tuple", "nullable": false, "items": [ { "type": "int8", "nullable": false }, { "type": "int8", "nullable": false } ] }
|
||||
]}},
|
||||
{ "path": "tuple<bool,udt>", "type": {
|
||||
"type": "tuple", "items": [
|
||||
{ "type": "bool", "nullable": false },
|
||||
{ "type": "schema", "name": "Point", "nullable": false}
|
||||
]}},
|
||||
{ "path": "nullable<int32,int64>", "type": {
|
||||
"type": "tuple",
|
||||
"items": [ { "type": "int32", "nullable": true }, { "type": "int64", "nullable": true }]
|
||||
} },
|
||||
{ "path": "tagged<utf8>", "type": {
|
||||
"type": "tagged", "items": [
|
||||
{ "type": "utf8", "nullable": false }
|
||||
]}},
|
||||
{ "path": "tagged<bool,utf8>", "type": {
|
||||
"type": "tagged", "items": [
|
||||
{ "type": "bool", "nullable": false },
|
||||
{ "type": "utf8", "nullable": false }
|
||||
]}},
|
||||
{ "path": "set_t<utf8>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "utf8", "nullable": false }
|
||||
} },
|
||||
{ "path": "set_t<array_t<int8>>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "array", "nullable": false, "items": { "type": "int8", "nullable": false } }
|
||||
} },
|
||||
{ "path": "set_t<set_t<int32>>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "set", "nullable": false, "items": { "type": "int32", "nullable": false } }
|
||||
} },
|
||||
{ "path": "set_t<udt>", "type": {
|
||||
"type": "set",
|
||||
"items": { "type": "schema", "name": "Point", "nullable": false}
|
||||
} },
|
||||
{ "path": "map_t<utf8,utf8>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "utf8", "nullable": false },
|
||||
"values": { "type": "utf8", "nullable": false }
|
||||
} },
|
||||
{ "path": "map_t<int8,array_t<int8>>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "int8", "nullable": false },
|
||||
"values": { "type": "array", "nullable": false, "items": { "type": "int8", "nullable": false } }
|
||||
} },
|
||||
{ "path": "map_t<int16,map_t<int32,int32>>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "int16", "nullable": false },
|
||||
"values": {
|
||||
"type": "map",
|
||||
"nullable": false,
|
||||
"keys": { "type": "int32", "nullable": false },
|
||||
"values": { "type": "int32", "nullable": false }
|
||||
}
|
||||
} },
|
||||
{ "path": "map_t<float64,udt>", "type": {
|
||||
"type": "map",
|
||||
"keys": { "type": "float64", "nullable": false },
|
||||
"values": { "type": "schema", "name": "Point", "nullable": false}
|
||||
} }
|
||||
]},
|
||||
{ "name": "Point", "id": 4, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "x", "type": { "type": "int32", "storage": "fixed" } },
|
||||
{ "path": "y", "type": { "type": "int32", "storage": "fixed" } }
|
||||
]}
|
||||
]
|
||||
}
|
||||
BIN
experimental/java/test-data/RootSegment.bin
Normal file
BIN
experimental/java/test-data/RootSegment.bin
Normal file
Binary file not shown.
BIN
experimental/java/test-data/RootSegment.hybridrow
Normal file
BIN
experimental/java/test-data/RootSegment.hybridrow
Normal file
Binary file not shown.
609
experimental/java/test-data/RootSegment.json
Normal file
609
experimental/java/test-data/RootSegment.json
Normal file
@@ -0,0 +1,609 @@
|
||||
{
|
||||
"version": "v1",
|
||||
"schemas": [{
|
||||
"name": "RootSegment",
|
||||
"id": -1,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "PropertyBag",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "RootSegmentPropertyBag",
|
||||
"id": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SegmentInfos",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "schema",
|
||||
"name": "SegmentInfo",
|
||||
"id": 1,
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SnapshotInfos",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "schema",
|
||||
"name": "SnapshotInfo",
|
||||
"id": 5,
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidationManifest",
|
||||
"id": -2,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "PropertyBag",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "InvalidationManifestPropertyBag",
|
||||
"id": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "StreamInfos",
|
||||
"type": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "schema",
|
||||
"name": "InvalidationStreamInfo",
|
||||
"id": 10,
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SegmentInfo",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "LSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PSID",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "FileId",
|
||||
"id": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SegmentMetadata",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "SegmentMetadata",
|
||||
"id": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ReferenceCount",
|
||||
"type": {
|
||||
"type": "uint8",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ZeroUtilizationTimestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Control",
|
||||
"type": {
|
||||
"type": "uint8",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "FileId",
|
||||
"id": 2,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "StorageAccountIndex",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "FileType",
|
||||
"type": {
|
||||
"type": "int16",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "FileIndex",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PartitionId",
|
||||
"type": {
|
||||
"type": "guid",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PartitionKeyRangeRid",
|
||||
"type": {
|
||||
"type": "binary",
|
||||
"storage": "fixed",
|
||||
"length": 30,
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SequenceVector",
|
||||
"id": 3,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "GlobalSequenceNumber",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LocalSequenceNumber",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SegmentMetadata",
|
||||
"id": 4,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "InitialRecordCount",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "TombstoneRecordCount",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "InvalidatedRecordCount",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SegmentSize",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "MinSequenceVector",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "SequenceVector",
|
||||
"id": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "MaxSequenceVector",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "SequenceVector",
|
||||
"id": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "InvalidationFileId",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "FileId",
|
||||
"id": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "InvalidationStats",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "InvalidationStats",
|
||||
"id": 6
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SchemaHash",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ExpiredRecordCount",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "MinRecordTimestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "MaxRecordTimestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PartialSegment",
|
||||
"type": {
|
||||
"type": "bool",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SnapshotInfo",
|
||||
"id": 5,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "SnapshotId",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Timestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PSID",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "FileId",
|
||||
"id": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "TTL",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidationStats",
|
||||
"id": 6,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "Count",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "SizeInBytes",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RootSegmentPropertyBag",
|
||||
"id": 7,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "Control",
|
||||
"type": {
|
||||
"type": "uint8",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "NumberOfEntries",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "NumberOfSnapshots",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LastCheckpointedLSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LastCheckpointedSequenceVector",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "SequenceVector",
|
||||
"id": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LastFlushedLSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LastFlushedSequenceVector",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "SequenceVector",
|
||||
"id": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LastRestoredSourceOffset",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "Logoffset",
|
||||
"id": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LogVersion",
|
||||
"type": {
|
||||
"type": "uint8",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Timestamp",
|
||||
"type": {
|
||||
"type": "uint64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ArchivalPartitionId",
|
||||
"type": {
|
||||
"type": "guid",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "TTL",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "PhysicalUsageInKB",
|
||||
"type": {
|
||||
"type": "uint64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "LogicalUsageInKB",
|
||||
"type": {
|
||||
"type": "uint64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Logoffset",
|
||||
"id": 8,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "LSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "RecordGroupID",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "RecordIndex",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidationManifestPropertyBag",
|
||||
"id": 9,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "NumberOfEntries",
|
||||
"type": {
|
||||
"type": "uint32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "MaxMergedLevel0LSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Timestamp",
|
||||
"type": {
|
||||
"type": "uint64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "InvalidationStreamInfo",
|
||||
"id": 10,
|
||||
"type": "schema",
|
||||
"properties": [{
|
||||
"path": "InvalidationFileId",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "FileId",
|
||||
"id": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "State",
|
||||
"type": {
|
||||
"type": "uint8",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "StartLSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "EndLSID",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "Level",
|
||||
"type": {
|
||||
"type": "int32",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "CreationTimestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "ObsoletionTimestamp",
|
||||
"type": {
|
||||
"type": "int64",
|
||||
"storage": "fixed",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "InvalidationStats",
|
||||
"type": {
|
||||
"type": "schema",
|
||||
"name": "InvalidationStats",
|
||||
"id": 6
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
171
experimental/java/test-data/SchemaHashCoverageSchema.json
Normal file
171
experimental/java/test-data/SchemaHashCoverageSchema.json
Normal file
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"name": "Microsoft.Azure.Cosmos.Serialization.HybridRow.Tests.Unit.SchemaHashTest",
|
||||
"schemas": [
|
||||
{
|
||||
"version": "v1",
|
||||
"comment": "Some UDT definition",
|
||||
"name": "UDT",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{
|
||||
"path": "item1",
|
||||
"type": {
|
||||
"length": 0,
|
||||
"storage": "fixed",
|
||||
"type": "int32",
|
||||
"nullable": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "item2",
|
||||
"type": {
|
||||
"length": 10,
|
||||
"storage": "variable",
|
||||
"type": "utf8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"partitionkeys": [],
|
||||
"primarykeys": []
|
||||
},
|
||||
{
|
||||
"version": "v1",
|
||||
"comment": "Some table definition",
|
||||
"name": "Table",
|
||||
"id": 2,
|
||||
"options": {
|
||||
"disallowUnschematized": true,
|
||||
"enablePropertyLevelTimestamp": true
|
||||
},
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{
|
||||
"path": "fixed",
|
||||
"type": {
|
||||
"length": 0,
|
||||
"storage": "fixed",
|
||||
"apitype": "myfixed",
|
||||
"type": "int32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "array",
|
||||
"type": {
|
||||
"items": {
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int8"
|
||||
},
|
||||
"immutable": true,
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "obj",
|
||||
"type": {
|
||||
"properties": [
|
||||
{
|
||||
"path": "nested",
|
||||
"type": {
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int32"
|
||||
}
|
||||
}
|
||||
],
|
||||
"immutable": false,
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "map",
|
||||
"type": {
|
||||
"keys": {
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int8"
|
||||
},
|
||||
"values": {
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int8"
|
||||
},
|
||||
"immutable": false,
|
||||
"type": "map"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "set",
|
||||
"type": {
|
||||
"items": {
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int8"
|
||||
},
|
||||
"immutable": false,
|
||||
"type": "set"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "tagged",
|
||||
"type": {
|
||||
"items": [
|
||||
{
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int32"
|
||||
}
|
||||
],
|
||||
"immutable": false,
|
||||
"type": "tagged"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "tuple",
|
||||
"type": {
|
||||
"items": [
|
||||
{
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "int32"
|
||||
},
|
||||
{
|
||||
"length": 0,
|
||||
"storage": "sparse",
|
||||
"type": "float32"
|
||||
}
|
||||
],
|
||||
"immutable": false,
|
||||
"type": "tuple"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "udt",
|
||||
"type": {
|
||||
"name": "UDT",
|
||||
"id": 1,
|
||||
"immutable": false,
|
||||
"type": "schema"
|
||||
}
|
||||
}
|
||||
],
|
||||
"partitionkeys": [
|
||||
{
|
||||
"path": "fixed"
|
||||
}
|
||||
],
|
||||
"primarykeys": [
|
||||
{
|
||||
"path": "fixed",
|
||||
"direction": "asc"
|
||||
}
|
||||
],
|
||||
"statickeys": [
|
||||
{
|
||||
"path": "fixed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
28
experimental/java/test-data/TagSchema.json
Normal file
28
experimental/java/test-data/TagSchema.json
Normal file
@@ -0,0 +1,28 @@
|
||||
// Tag demo schema that utilizes typed arrays.
|
||||
{
|
||||
"schemas": [
|
||||
{ "name": "Tagged", "id": 1, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "title", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "tags", "type": { "type": "array",
|
||||
"items": { "type": "utf8", "nullable": false } } },
|
||||
{ "path": "options", "type": { "type": "array",
|
||||
"items": { "type": "int32", "nullable": true } } },
|
||||
{ "path": "ratings", "type": { "type": "array",
|
||||
"items": { "type": "array", "nullable": false, "items": { "type": "float64", "nullable": false } } } },
|
||||
{ "path": "similars", "type": { "type": "array",
|
||||
"items": { "type": "schema", "name": "SimilarMatch", "nullable": false } } },
|
||||
{ "path": "priority", "type": { "type": "array",
|
||||
"items": { "type": "tuple", "nullable": false,
|
||||
"items": [
|
||||
{ "type": "utf8", "nullable": false },
|
||||
{ "type": "int64", "nullable": false }
|
||||
]}}}
|
||||
]},
|
||||
{ "name": "SimilarMatch", "id": 2, "type": "schema",
|
||||
"properties": [
|
||||
{ "path": "thumbprint", "type": { "type": "utf8", "storage": "fixed", "length": 18 } },
|
||||
{ "path": "score", "type": { "type": "float64", "storage": "fixed" } }
|
||||
]}
|
||||
]
|
||||
}
|
||||
28
experimental/java/test-data/TaggedApiSchema.json
Normal file
28
experimental/java/test-data/TaggedApiSchema.json
Normal file
@@ -0,0 +1,28 @@
|
||||
// Tagged demo schema that utilizes tagged types.
|
||||
{
|
||||
"schemas": [
|
||||
{
|
||||
"name": "TaggedApi",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{
|
||||
"path": "tag1",
|
||||
"type": {
|
||||
"type": "tagged",
|
||||
"immutable": true,
|
||||
"items": [{ "type": "utf8", "nullable": false }]
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "tag2",
|
||||
"type": {
|
||||
"type": "tagged",
|
||||
"immutable": false,
|
||||
"items": [{ "type": "int32", "nullable": false }, { "type": "int64", "nullable": false }]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
75
experimental/java/test-data/TodoSchema.json
Normal file
75
experimental/java/test-data/TodoSchema.json
Normal file
@@ -0,0 +1,75 @@
|
||||
// Todo demo schema that utilizes typed sets.
|
||||
{
|
||||
"schemas": [
|
||||
{
|
||||
"name": "Todo",
|
||||
"id": 1,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "attendees", "type": { "type": "set", "items": { "type": "utf8", "nullable": false } } },
|
||||
{ "path": "projects", "type": { "type": "set", "items": { "type": "guid", "nullable": false } } },
|
||||
{ "path": "checkboxes", "type": { "type": "set", "items": { "type": "bool", "nullable": false } } },
|
||||
{
|
||||
"path": "prices",
|
||||
"type": {
|
||||
"type": "set",
|
||||
"items": {
|
||||
"type": "set",
|
||||
"immutable": true,
|
||||
"nullable": false,
|
||||
"items": { "type": "float32", "nullable": false }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "nested",
|
||||
"type": {
|
||||
"type": "set",
|
||||
"items": {
|
||||
"type": "set",
|
||||
"immutable": true,
|
||||
"nullable": false,
|
||||
"items":
|
||||
{
|
||||
"type": "set",
|
||||
"immutable": true,
|
||||
"nullable": false,
|
||||
"items": {
|
||||
"type": "int32",
|
||||
"nullable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "shopping",
|
||||
"type": { "type": "set", "items": { "type": "schema", "name": "ShoppingItem", "nullable": false } }
|
||||
},
|
||||
{
|
||||
"path": "work",
|
||||
"type": {
|
||||
"type": "set",
|
||||
"items": {
|
||||
"type": "tuple",
|
||||
"nullable": false,
|
||||
"items": [
|
||||
{ "type": "bool", "nullable": false },
|
||||
{ "type": "varuint", "nullable": false }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ShoppingItem",
|
||||
"id": 2,
|
||||
"type": "schema",
|
||||
"properties": [
|
||||
{ "path": "label", "type": { "type": "utf8", "storage": "variable" } },
|
||||
{ "path": "count", "type": { "type": "uint8", "storage": "fixed" } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user