Excluding most tests with the expectation that we'll bring them in as we continue to expand our test matrix.

This commit is contained in:
David Noble
2019-09-13 14:23:01 -07:00
parent 99e2d462cd
commit 9164d0113d
82 changed files with 22411 additions and 22256 deletions
@@ -6,7 +6,7 @@ package com.azure.data.cosmos.core;
import java.util.Objects; import java.util.Objects;
/** /**
* A container object which may or may not contain a non-null value * A container object which may or may not contain a non-null value.
* *
* This is a value-based class and as such use of identity-sensitive operations--including reference equality * This is a value-based class and as such use of identity-sensitive operations--including reference equality
* ({@code ==}), identity hash code, or synchronization--on instances of {@Reference} may have unpredictable results * ({@code ==}), identity hash code, or synchronization--on instances of {@Reference} may have unpredictable results
@@ -34,7 +34,7 @@ public final class Reference<T> {
} }
/** /**
* {@code true} if there is a value present, otherwise {@code false} * {@code true} if there is a value present, otherwise {@code false}.
* *
* This is equivalent to evaluating the expression {@code ref.get() == null}. * This is equivalent to evaluating the expression {@code ref.get() == null}.
* *
@@ -45,7 +45,7 @@ public final class Reference<T> {
} }
/** /**
* Indicates whether some other object is equal to this {@link Reference} value. The other object is considered equal if: * Indicates whether some other object is equal to this {@link Reference} value. The other object is considered equal if:.
* <ul> * <ul>
* <li>it is also an {@link Reference} and; * <li>it is also an {@link Reference} and;
* <li>both instances have no value present or; * <li>both instances have no value present or;
@@ -44,16 +44,14 @@ public final class Float128 {
} }
/** /**
* The high-order 64 bits of the IEEE 754-2008 128-bit decimal floating point, using the BID * The high-order 64 bits of the IEEE 754-2008 128-bit decimal floating point, using the BID encoding scheme.
* encoding scheme.
*/ */
public long high() { public long high() {
return this.high; return this.high;
} }
/** /**
* The low-order 64 bits of the IEEE 754-2008 128-bit decimal floating point, using the BID * The low-order 64 bits of the IEEE 754-2008 128-bit decimal floating point, using the BID encoding scheme.
* encoding scheme.
*/ */
public long low() { public long low() {
return this.low; return this.low;
@@ -16,7 +16,7 @@ public final class HybridRowHeader {
private HybridRowVersion version = HybridRowVersion.values()[0]; private HybridRowVersion version = HybridRowVersion.values()[0];
/** /**
* Initializes a new instance of a {@link HybridRowHeader} * Initializes a new instance of a {@link HybridRowHeader}.
* *
* @param version The version of the HybridRow library used to write this row. * @param version The version of the HybridRow library used to write this row.
* @param schemaId The unique identifier of the schema whose layout was used to write this row. * @param schemaId The unique identifier of the schema whose layout was used to write this row.
@@ -7,7 +7,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
/** /**
* Versions of HybridRow * Versions of HybridRow.
* <p> * <p>
* A version from this list MUST be inserted in the version BOM at the beginning of all rows. * A version from this list MUST be inserted in the version BOM at the beginning of all rows.
*/ */
@@ -88,7 +88,7 @@ import static com.google.common.base.Strings.lenientFormat;
//import static com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutTypes.MongoDbObjectId; //import static com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutTypes.MongoDbObjectId;
/** /**
* Manages a sequence of bytes representing a Hybrid Row * Manages a sequence of bytes representing a Hybrid Row.
* <p> * <p>
* A Hybrid Row begins in the 0-th byte of the {@link RowBuffer}. The sequence of bytes is defined by the Hybrid Row * A Hybrid Row begins in the 0-th byte of the {@link RowBuffer}. The sequence of bytes is defined by the Hybrid Row
* grammar. * grammar.
@@ -99,7 +99,7 @@ public final class RowBuffer {
private LayoutResolver resolver; private LayoutResolver resolver;
/** /**
* Initializes a new instance of a {@link RowBuffer} * Initializes a new instance of a {@link RowBuffer}.
* *
* @param capacity Initial buffer capacity. * @param capacity Initial buffer capacity.
*/ */
@@ -108,7 +108,7 @@ public final class RowBuffer {
} }
/** /**
* Initializes a new instance of a {@link RowBuffer} * Initializes a new instance of a {@link RowBuffer}.
* *
* @param capacity Initial buffer capacity * @param capacity Initial buffer capacity
* @param allocator A buffer allocator * @param allocator A buffer allocator
@@ -121,7 +121,7 @@ public final class RowBuffer {
} }
/** /**
* Initializes a new instance of a {@link RowBuffer} from an existing buffer * Initializes a new instance of a {@link RowBuffer} from an existing buffer.
* *
* @param buffer An existing {@link ByteBuf} containing a Hybrid Row. This instance takes ownership of the buffer. * @param buffer An existing {@link ByteBuf} containing a Hybrid Row. This instance takes ownership of the buffer.
* Hence, the caller should not maintain a reference to the buffer or mutate the buffer after this * Hence, the caller should not maintain a reference to the buffer or mutate the buffer after this
@@ -156,7 +156,7 @@ public final class RowBuffer {
} }
/** /**
* Compute the byte offset from the beginning of the row for a given variable's value * Compute the byte offset from the beginning of the row for a given variable's value.
* *
* @param layout The (optional) layout of the current scope. * @param layout The (optional) layout of the current scope.
* @param scopeOffset The zero-based offset to the beginning of the scope's value. * @param scopeOffset The zero-based offset to the beginning of the scope's value.
@@ -196,7 +196,7 @@ public final class RowBuffer {
} }
/** /**
* Compute the number of bytes necessary to store the unsigned 32-bit integer value using the varuint encoding * Compute the number of bytes necessary to store the unsigned 32-bit integer value using the varuint encoding.
* *
* @param value The value to be encoded * @param value The value to be encoded
* @return The number of bytes needed to store the varuint encoding of {@code value} * @return The number of bytes needed to store the varuint encoding of {@code value}
@@ -218,7 +218,7 @@ public final class RowBuffer {
} }
/** /**
* Delete the sparse field at the specified cursor position * Delete the sparse field at the specified cursor position.
* *
* @param edit identifies the field to delete * @param edit identifies the field to delete
*/ */
@@ -242,7 +242,7 @@ public final class RowBuffer {
} }
/** /**
* Delete the variable-length field at a specified {@code offset} * Delete the variable-length field at a specified {@code offset}.
* <p> * <p>
* The field is interpreted as either a variable-length integer or a variable-length sequence of bytes as indicated * The field is interpreted as either a variable-length integer or a variable-length sequence of bytes as indicated
* by the value of {@code isVarint}. * by the value of {@code isVarint}.
@@ -319,14 +319,14 @@ public final class RowBuffer {
} }
/** /**
* The length of this {@link RowBuffer} in bytes * The length of this {@link RowBuffer} in bytes.
*/ */
public int length() { public int length() {
return this.buffer.writerIndex(); return this.buffer.writerIndex();
} }
/** /**
* Compute the byte offsets from the beginning of the row for a given sparse field insertion * Compute the byte offsets from the beginning of the row for a given sparse field insertion.
* into a set/map. * into a set/map.
* *
* @param scope The sparse scope to insert into. * @param scope The sparse scope to insert into.
@@ -448,7 +448,7 @@ public final class RowBuffer {
} }
/** /**
* Reads in the contents of the current {@link RowBuffer} from an {@link InputStream} * Reads in the contents of the current {@link RowBuffer} from an {@link InputStream}.
* <p> * <p>
* The {@link RowBuffer} is initialized with the associated layout and row {@code version}. * The {@link RowBuffer} is initialized with the associated layout and row {@code version}.
* *
@@ -488,7 +488,7 @@ public final class RowBuffer {
} }
/** /**
* Reads the contents of the current {@link RowBuffer} from a {@link ByteBuf} * Reads the contents of the current {@link RowBuffer} from a {@link ByteBuf}.
* <p> * <p>
* The {@link RowBuffer} is initialized with a copy of the specified input {@link ByteBuf} and the associated layout * The {@link RowBuffer} is initialized with a copy of the specified input {@link ByteBuf} and the associated layout
* and row {@code version}. * and row {@code version}.
@@ -795,7 +795,7 @@ public final class RowBuffer {
// } // }
/** /**
* Rotates the sign bit of a two's complement value to the least significant bit * Rotates the sign bit of a two's complement value to the least significant bit.
* *
* @param value A signed value. * @param value A signed value.
* @return An unsigned value encoding the same value but with the sign bit in the LSB. * @return An unsigned value encoding the same value but with the sign bit in the LSB.
@@ -1172,7 +1172,7 @@ public final class RowBuffer {
} }
/** /**
* Sets the specified 64-bit integer at the current {@link RowBuffer position} as a 7-bit encoded 32-bit value * Sets the specified 64-bit integer at the current {@link RowBuffer position} as a 7-bit encoded 32-bit value.
* <p> * <p>
* The 64-bit integer value is written 7-bits at a time. The high bit of the byte, when set, indicates there are * The 64-bit integer value is written 7-bits at a time. The high bit of the byte, when set, indicates there are
* more bytes. An {@link IllegalArgumentException} is thrown, if the specified 64-bit integer value is outside * more bytes. An {@link IllegalArgumentException} is thrown, if the specified 64-bit integer value is outside
@@ -2011,7 +2011,7 @@ public final class RowBuffer {
} }
/** /**
* Writes the content of the buffer on to an {@link OutputStream} * Writes the content of the buffer on to an {@link OutputStream}.
* *
* @param stream the target @{link OutputStream} * @param stream the target @{link OutputStream}
* @throws IOException if the specified {@code stream} throws an {@link IOException} during output * @throws IOException if the specified {@code stream} throws an {@link IOException} during output
@@ -2307,7 +2307,7 @@ public final class RowBuffer {
} }
/** /**
* Compares the values of two encoded key-value pair fields using the hybrid row binary * Compares the values of two encoded key-value pair fields using the hybrid row binary.
* collation. * collation.
* *
* @param left An edit describing the left field. * @param left An edit describing the left field.
@@ -2500,7 +2500,7 @@ public final class RowBuffer {
} }
/** /**
* Ensure that sufficient space exists in the row buffer to write the specified value * Ensure that sufficient space exists in the row buffer to write the specified value.
* *
* @param length The number of bytes needed to encode the value of the field to be written. * @param length The number of bytes needed to encode the value of the field to be written.
* @param edit The prepared edit indicating where and in what context the current write will happen. * @param edit The prepared edit indicating where and in what context the current write will happen.
@@ -2591,7 +2591,7 @@ public final class RowBuffer {
} }
/** /**
* Ensure that sufficient space exists in the row buffer to write the specified value * Ensure that sufficient space exists in the row buffer to write the specified value.
* *
* @param length The number of bytes needed to encode the value of the field to be written. * @param length The number of bytes needed to encode the value of the field to be written.
* @param edit The prepared edit indicating where and in what context the current write will happen. * @param edit The prepared edit indicating where and in what context the current write will happen.
@@ -2645,7 +2645,7 @@ public final class RowBuffer {
} }
/** /**
* Sorts a {@code uniqueIndex} list using the hybrid row binary collation * Sorts a {@code uniqueIndex} list using the hybrid row binary collation.
* *
* @param scope The scope to be sorted. * @param scope The scope to be sorted.
* @param edit A edit that points at the scope. * @param edit A edit that points at the scope.
@@ -2931,7 +2931,7 @@ public final class RowBuffer {
} }
/** /**
* Skip over a nested scope * Skip over a nested scope.
* *
* @param edit The sparse scope to search * @param edit The sparse scope to search
* @return The zero-based byte offset immediately following the scope end marker * @return The zero-based byte offset immediately following the scope end marker
@@ -2950,7 +2950,7 @@ public final class RowBuffer {
} }
/** /**
* Compute the size of a sparse (primitive) field * Compute the size of a sparse (primitive) field.
* *
* @param type The type of the current sparse field. * @param type The type of the current sparse field.
* @param metaOffset The zero-based offset from the beginning of the row where the field begins. * @param metaOffset The zero-based offset from the beginning of the row where the field begins.
@@ -3039,7 +3039,7 @@ public final class RowBuffer {
} }
/** /**
* Compute the size of a sparse field * Compute the size of a sparse field.
* *
* @param edit The edit structure describing the field to measure. * @param edit The edit structure describing the field to measure.
* @return The length (in bytes) of the encoded field including the metadata and the value. * @return The length (in bytes) of the encoded field including the metadata and the value.
@@ -3056,7 +3056,7 @@ public final class RowBuffer {
} }
/** /**
* Reads and validates the header of the current {@link RowBuffer} * Reads and validates the header of the current {@link RowBuffer}.
* *
* @return {@code true} if the header validation succeeded; otherwise, if the header is invalid, {@code false} * @return {@code true} if the header validation succeeded; otherwise, if the header is invalid, {@code false}
*/ */
@@ -3378,7 +3378,7 @@ public final class RowBuffer {
} }
/** /**
* Represents a single item within a set/map scope that needs to be indexed * Represents a single item within a set/map scope that needs to be indexed.
* <p> * <p>
* This structure is used when rebuilding a set/map index during row streaming via {@link RowWriter}.Each item * This structure is used when rebuilding a set/map index during row streaming via {@link RowWriter}.Each item
* encodes its offsets and length within the row. * encodes its offsets and length within the row.
@@ -3403,7 +3403,7 @@ public final class RowBuffer {
} }
/** /**
* If existing, the offset to the metadata of the existing field, otherwise the location to insert a new field * If existing, the offset to the metadata of the existing field, otherwise the location to insert a new field.
*/ */
public int metaOffset() { public int metaOffset() {
return this.metaOffset; return this.metaOffset;
@@ -3415,7 +3415,7 @@ public final class RowBuffer {
} }
/** /**
* Size of the target element * Size of the target element.
*/ */
public int size() { public int size() {
return this.size; return this.size;
@@ -3427,7 +3427,7 @@ public final class RowBuffer {
} }
/** /**
* If existing, the offset to the value of the existing field, otherwise undefined * If existing, the offset to the value of the existing field, otherwise undefined.
*/ */
public int valueOffset() { public int valueOffset() {
return this.valueOffset; return this.valueOffset;
@@ -126,7 +126,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* If existing, the offset to the end of the existing field. Used as a hint when skipping * If existing, the offset to the end of the existing field. Used as a hint when skipping.
* forward. * forward.
*/ */
public int endOffset() { public int endOffset() {
@@ -151,7 +151,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* If {@code true}, this scope's nested fields cannot be updated individually * If {@code true}, this scope's nested fields cannot be updated individually.
* <p> * <p>
* The entire scope can still be replaced. * The entire scope can still be replaced.
*/ */
@@ -165,7 +165,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* For indexed scopes (e.g. an Array scope), the zero-based index into the scope of the sparse field * For indexed scopes (e.g. an Array scope), the zero-based index into the scope of the sparse field.
*/ */
public int index() { public int index() {
return this.index; return this.index;
@@ -189,7 +189,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* If existing, the offset to the metadata of the existing field, otherwise the location to * If existing, the offset to the metadata of the existing field, otherwise the location to.
* insert a new field. * insert a new field.
*/ */
public int metaOffset() { public int metaOffset() {
@@ -226,7 +226,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* The kind of scope within which this edit was prepared * The kind of scope within which this edit was prepared.
*/ */
public LayoutTypeScope scopeType() { public LayoutTypeScope scopeType() {
return this.scopeType; return this.scopeType;
@@ -238,7 +238,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* The type parameters of the scope within which this edit was prepared * The type parameters of the scope within which this edit was prepared.
*/ */
public TypeArgumentList scopeTypeArgs() { public TypeArgumentList scopeTypeArgs() {
return this.scopeTypeArgs; return this.scopeTypeArgs;
@@ -250,8 +250,7 @@ public final class RowCursor implements Cloneable {
} }
/** /**
* The 0-based byte offset from the beginning of the row where the first sparse field within * The 0-based byte offset from the beginning of the row where the first sparse field within the scope begins.
* the scope begins.
*/ */
public int start() { public int start() {
return this.start; return this.start;
@@ -22,7 +22,7 @@ import java.io.IOException;
import static com.google.common.base.Strings.lenientFormat; import static com.google.common.base.Strings.lenientFormat;
/** /**
* The unique identifier for a schema * The unique identifier for a schema.
* Identifiers must be unique within the scope of the database in which they are used. * Identifiers must be unique within the scope of the database in which they are used.
*/ */
@JsonDeserialize(using = SchemaId.JsonDeserializer.class) @JsonDeserialize(using = SchemaId.JsonDeserializer.class)
@@ -65,7 +65,7 @@ public final class SchemaId implements Comparable<SchemaId> {
} }
/** /**
* {@code true} if this is the same {@link SchemaId} as {@code other} * {@code true} if this is the same {@link SchemaId} as {@code other}.
* *
* @param other The value to compare against. * @param other The value to compare against.
* @return True if the two values are the same. * @return True if the two values are the same.
@@ -78,7 +78,7 @@ public final class SchemaId implements Comparable<SchemaId> {
} }
/** /**
* Returns a {@link SchemaId} from a specified underlying integer value * Returns a {@link SchemaId} from a specified underlying integer value.
* *
* @return The integer value of this {@link SchemaId} * @return The integer value of this {@link SchemaId}
*/ */
@@ -97,7 +97,7 @@ public final class SchemaId implements Comparable<SchemaId> {
} }
/** /**
* The underlying integer value of this {@link SchemaId} * The underlying integer value of this {@link SchemaId}.
* *
* @return The integer value of this {@link SchemaId} * @return The integer value of this {@link SchemaId}
*/ */
@@ -11,14 +11,14 @@ package com.azure.data.cosmos.serialization.hybridrow;
*/ */
public final class UnixDateTime { public final class UnixDateTime {
/** /**
* Unix epoch * Unix epoch.
* <p> * <p>
* {@link UnixDateTime} values are signed values centered on this value. * {@link UnixDateTime} values are signed values centered on this value.
*/ */
public static final UnixDateTime EPOCH = new UnixDateTime(); public static final UnixDateTime EPOCH = new UnixDateTime();
/** /**
* Size in bytes of a {@link UnixDateTime} * Size in bytes of a {@link UnixDateTime}.
*/ */
public static final int BYTES = Long.SIZE; public static final int BYTES = Long.SIZE;
@@ -36,7 +36,7 @@ public final class Murmur3Hash {
private static final ByteBuf EMPTY_STRING = Constant.add(""); private static final ByteBuf EMPTY_STRING = Constant.add("");
/** /**
* Computes a 128-bit Murmur3Hash 128-bit value for a data item * Computes a 128-bit Murmur3Hash 128-bit value for a data item.
* *
* @param item The data to hash * @param item The data to hash
* @param seed The seed with which to initialize * @param seed The seed with which to initialize
@@ -55,7 +55,7 @@ import static com.google.common.base.Preconditions.checkState;
import static com.google.common.base.Strings.lenientFormat; import static com.google.common.base.Strings.lenientFormat;
/** /**
* A forward-only, streaming, field reader for {@link RowBuffer} * A forward-only, streaming, field reader for {@link RowBuffer}.
* <p> * <p>
* A {@link RowReader} allows the traversal in a streaming, left to right fashion, of an entire HybridRow. The row's * A {@link RowReader} allows the traversal in a streaming, left to right fashion, of an entire HybridRow. The row's
* layout provides decoding for any schematized portion of the row. However, unschematized sparse fields are read * layout provides decoding for any schematized portion of the row. However, unschematized sparse fields are read
@@ -75,7 +75,7 @@ public final class RowReader {
private States state; private States state;
/** /**
* Initializes a new instance of the {@link RowReader} class * Initializes a new instance of the {@link RowReader} class.
* *
* @param row The row to be read * @param row The row to be read
*/ */
@@ -84,7 +84,7 @@ public final class RowReader {
} }
/** /**
* Initializes a new instance of the {@link RowReader} class * Initializes a new instance of the {@link RowReader} class.
* *
* @param row The row to be read * @param row The row to be read
* @param checkpoint Initial state of the reader * @param checkpoint Initial state of the reader
@@ -101,7 +101,7 @@ public final class RowReader {
} }
/** /**
* Initializes a new instance of the {@link RowReader} class * Initializes a new instance of the {@link RowReader} class.
* *
* @param row The row to be read * @param row The row to be read
* @param scope Cursor defining the scope of the fields to be read * @param scope Cursor defining the scope of the fields to be read
@@ -123,7 +123,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a fixed length {@code MongoDbObjectId} value * Read the current field as a fixed length {@code MongoDbObjectId} value.
* *
* @param value On success, receives the value, undefined otherwise * @param value On success, receives the value, undefined otherwise
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -151,7 +151,7 @@ public final class RowReader {
} }
/** /**
* {@code true} if field has a value--if positioned on a field--undefined otherwise * {@code true} if field has a value--if positioned on a field--undefined otherwise.
* <p> * <p>
* If the current field is a Nullable scope, this method return true if the value is not null. If the current field * If the current field is a Nullable scope, this method return true if the value is not null. If the current field
* is a nullable Null primitive value, this method return true if the value is set (even though its values is set * is a nullable Null primitive value, this method return true if the value is set (even though its values is set
@@ -177,7 +177,7 @@ public final class RowReader {
} }
/** /**
* Zero-based index, relative to the scope, of the field--if positioned on a field--undefined otherwise * Zero-based index, relative to the scope, of the field--if positioned on a field--undefined otherwise.
* <p> * <p>
* When enumerating a non-indexed scope, this value is always zero. * When enumerating a non-indexed scope, this value is always zero.
* *
@@ -188,14 +188,14 @@ public final class RowReader {
} }
/** /**
* The length of row in bytes * The length of row in bytes.
*/ */
public int length() { public int length() {
return this.row.length(); return this.row.length();
} }
/** /**
* The path, relative to the scope, of the field--if positioned on a field--undefined otherwise * The path, relative to the scope, of the field--if positioned on a field--undefined otherwise.
* <p> * <p>
* When enumerating an indexed scope, this value is always null. * When enumerating an indexed scope, this value is always null.
* *
@@ -224,7 +224,7 @@ public final class RowReader {
} }
/** /**
* The path, relative to the scope, of the field--if positioned on a field--undefined otherwise * The path, relative to the scope, of the field--if positioned on a field--undefined otherwise.
* <p> * <p>
* When enumerating an indexed scope, this value is always null. * When enumerating an indexed scope, this value is always null.
* *
@@ -242,7 +242,7 @@ public final class RowReader {
} }
/** /**
* Advances the reader to the next field * Advances the reader to the next field.
* *
* @return {@code true}, if there is another field to be read; {@code false} otherwise * @return {@code true}, if there is another field to be read; {@code false} otherwise
*/ */
@@ -292,7 +292,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a variable length, sequence of bytes * Read the current field as a variable length, sequence of bytes.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -321,7 +321,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a variable length, sequence of bytes * Read the current field as a variable length, sequence of bytes.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -341,7 +341,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a {@link Boolean} * Read the current field as a {@link Boolean}.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -369,7 +369,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a fixed length {@code DateTime} value * Read the current field as a fixed length {@code DateTime} value.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -397,7 +397,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a fixed length decimal value * Read the current field as a fixed length decimal value.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -424,7 +424,7 @@ public final class RowReader {
} }
/** /**
* Read the current field as a fixed length, 128-bit, IEEE-encoded floating point value * Read the current field as a fixed length, 128-bit, IEEE-encoded floating point value.
* *
* @param value On success, receives the value, undefined otherwise. * @param value On success, receives the value, undefined otherwise.
* @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise. * @return {@link Result#SUCCESS} if the read is successful, an error {@link Result} otherwise.
@@ -59,7 +59,7 @@ public final class RowWriter {
private RowBuffer row; private RowBuffer row;
/** /**
* Initializes a new instance of the {@link RowWriter} class * Initializes a new instance of the {@link RowWriter} class.
* *
* @param row The row to be read. * @param row The row to be read.
* @param scope The scope into which items should be written. * @param scope The scope into which items should be written.
@@ -21,7 +21,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
/** /**
* A Layout describes the structure of a Hybrid Row * A Layout describes the structure of a Hybrid Row.
* <p> * <p>
* A layout indicates the number, order, and type of all schematized columns to be stored within a hybrid row. The * A layout indicates the number, order, and type of all schematized columns to be stored within a hybrid row. The
* order and type of columns defines the physical ordering of bytes used to encode the row and impacts the cost of * order and type of columns defines the physical ordering of bytes used to encode the row and impacts the cost of
@@ -97,7 +97,7 @@ public final class Layout {
} }
/** /**
* Finds a column specification for a column with a matching path * Finds a column specification for a column with a matching path.
* *
* @param path path of the column to find * @param path path of the column to find
* @return {@link LayoutColumn}, if a column with the {@code path} is found, {@link Optional#empty()} * @return {@link LayoutColumn}, if a column with the {@code path} is found, {@link Optional#empty()}
@@ -129,7 +129,7 @@ public final class Layout {
} }
/** /**
* Top level columns defined by the current {@link Layout} in left-to-right order * Top level columns defined by the current {@link Layout} in left-to-right order.
* *
* @return Top level columns defined by the current {@link Layout} in left-to-right order * @return Top level columns defined by the current {@link Layout} in left-to-right order
*/ */
@@ -188,7 +188,7 @@ public final class Layout {
} }
/** /**
* Returns a human readable diagnostic string representation of this {@link Layout} * Returns a human readable diagnostic string representation of this {@link Layout}.
* <p> * <p>
* This representation should only be used for debugging and diagnostic purposes. * This representation should only be used for debugging and diagnostic purposes.
*/ */
@@ -15,7 +15,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Strings.lenientFormat; import static com.google.common.base.Strings.lenientFormat;
/** /**
* Describes the physical byte layout of a hybrid row field of a specific physical type {@code T} * Describes the physical byte layout of a hybrid row field of a specific physical type {@code T}.
* *
* {@link LayoutType} provides methods for manipulating hybrid row fields of a particular type, and properties that * {@link LayoutType} provides methods for manipulating hybrid row fields of a particular type, and properties that
* describe the layout of fields of that type. * describe the layout of fields of that type.
@@ -4,7 +4,7 @@
package com.azure.data.cosmos.serialization.hybridrow.schemas; package com.azure.data.cosmos.serialization.hybridrow.schemas;
/** /**
* Map properties represent an unbounded set of zero or more key-value pairs with unique keys * Map properties represent an unbounded set of zero or more key-value pairs with unique keys.
* <p> * <p>
* Maps are typed or untyped. Within typed maps, all key MUST be the same type, and all values MUST be the same type. * Maps are typed or untyped. Within typed maps, all key MUST be the same type, and all values MUST be the same type.
* The type of both key and values is specified via {@link #keys} and {@link #values} respectively. Typed maps may be * The type of both key and values is specified via {@link #keys} and {@link #values} respectively. Typed maps may be
@@ -17,7 +17,7 @@ public class MapPropertyType extends ScopePropertyType {
private PropertyType values; private PropertyType values;
/** /**
* (Optional) type of the keys of the map, if a typed map, otherwise {@code null} * (Optional) type of the keys of the map, if a typed map, otherwise {@code null}.
*/ */
public final PropertyType keys() { public final PropertyType keys() {
return this.keys; return this.keys;
@@ -29,7 +29,7 @@ public class MapPropertyType extends ScopePropertyType {
} }
/** /**
* (Optional) type of the values of the map, if a typed map, otherwise {@code null} * (Optional) type of the values of the map, if a typed map, otherwise {@code null}.
*/ */
public final PropertyType values() { public final PropertyType values() {
return this.values; return this.values;
@@ -25,7 +25,7 @@ public class ObjectPropertyType extends ScopePropertyType {
} }
/** /**
* A list of zero or more property definitions that define the columns within the schema * A list of zero or more property definitions that define the columns within the schema.
*/ */
public final List<Property> properties() { public final List<Property> properties() {
return this.properties; return this.properties;
@@ -4,7 +4,7 @@
package com.azure.data.cosmos.serialization.hybridrow.schemas; package com.azure.data.cosmos.serialization.hybridrow.schemas;
/** /**
* Describes a property or set of properties used to order the data set within a single * Describes a property or set of properties used to order the data set within a single.
* partition. * partition.
*/ */
public class PrimarySortKey { public class PrimarySortKey {
@@ -19,7 +19,7 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
/** /**
* A schema describes either table or UDT metadata * A schema describes either table or UDT metadata.
* <p> * <p>
* The schema of a table or UDT describes the structure of row (i.e. which columns and the types of those columns). A * The schema of a table or UDT describes the structure of row (i.e. which columns and the types of those columns). A
* table schema represents the description of the contents of a collection level row directly. UDTs described nested * table schema represents the description of the contents of a collection level row directly. UDTs described nested
@@ -63,7 +63,7 @@ public class Schema {
} }
/** /**
* Compiles this logical schema into a physical layout that can be used to read and write rows * Compiles this logical schema into a physical layout that can be used to read and write rows.
* *
* @param ns The namespace within which this schema is defined. * @param ns The namespace within which this schema is defined.
* @return The layout for the schema. * @return The layout for the schema.
@@ -117,7 +117,7 @@ public class Schema {
} }
/** /**
* An (optional) list of zero or more logical paths that form the partition key * An (optional) list of zero or more logical paths that form the partition key.
* <p> * <p>
* All paths referenced MUST map to a property within the schema. This field is never null. * All paths referenced MUST map to a property within the schema. This field is never null.
* *
@@ -134,7 +134,7 @@ public class Schema {
} }
/** /**
* An (optional) list of zero or more logical paths that form the primary sort key * An (optional) list of zero or more logical paths that form the primary sort key.
* <p> * <p>
* All paths referenced MUST map to a property within the schema. This field is never null. * All paths referenced MUST map to a property within the schema. This field is never null.
* *
@@ -151,7 +151,7 @@ public class Schema {
} }
/** /**
* A list of zero or more property definitions that define the columns within the schema * A list of zero or more property definitions that define the columns within the schema.
* <p> * <p>
* This field is never null. * This field is never null.
* *
@@ -168,7 +168,7 @@ public class Schema {
} }
/** /**
* The unique identifier for a schema * The unique identifier for a schema.
* <p> * <p>
* Identifiers must be unique within the scope of the database in which they are used. * Identifiers must be unique within the scope of the database in which they are used.
*/ */
@@ -199,7 +199,7 @@ public class Schema {
} }
/** /**
* Returns a JSON string representation of the current {@link Schema} * Returns a JSON string representation of the current {@link Schema}.
* *
* @return a JSON string representation of the current {@link Schema} * @return a JSON string representation of the current {@link Schema}
*/ */
@@ -209,7 +209,7 @@ public class Schema {
} }
/** /**
* The type of this schema * The type of this schema.
* <p> * <p>
* This value MUST be {@link TypeKind#SCHEMA}. * This value MUST be {@link TypeKind#SCHEMA}.
*/ */
@@ -223,7 +223,7 @@ public class Schema {
} }
/** /**
* The version of the HybridRow Schema Definition Language used to encode this schema * The version of the HybridRow Schema Definition Language used to encode this schema.
*/ */
public final SchemaLanguageVersion version() { public final SchemaLanguageVersion version() {
return this.version; return this.version;
@@ -4,7 +4,7 @@
package com.azure.data.cosmos.serialization.hybridrow.schemas; package com.azure.data.cosmos.serialization.hybridrow.schemas;
/** /**
* Set properties represent an unbounded set of zero or more unique items * Set properties represent an unbounded set of zero or more unique items.
* <p> * <p>
* Sets may be typed or untyped. Within typed sets, all items MUST be the same type. The * Sets may be typed or untyped. Within typed sets, all items MUST be the same type. The
* type of items is specified via {@link #items}. Typed sets may be stored more efficiently * type of items is specified via {@link #items}. Typed sets may be stored more efficiently
@@ -4,14 +4,14 @@
package com.azure.data.cosmos.serialization.hybridrow.schemas; package com.azure.data.cosmos.serialization.hybridrow.schemas;
/** /**
* Describes a property or property set whose values MUST be the same for all rows that share the same partition key * Describes a property or property set whose values MUST be the same for all rows that share the same partition key.
*/ */
public class StaticKey { public class StaticKey {
private String path; private String path;
/** /**
* The logical path of the referenced property * The logical path of the referenced property.
* <p> * <p>
* Static path MUST refer to properties defined within the same {@link Schema}. * Static path MUST refer to properties defined within the same {@link Schema}.
*/ */
@@ -18,7 +18,7 @@ public class UdtPropertyType extends ScopePropertyType {
private SchemaId schemaId; private SchemaId schemaId;
/** /**
* Initializes a new {@link UdtPropertyType} * Initializes a new {@link UdtPropertyType}.
*/ */
public UdtPropertyType() { public UdtPropertyType() {
this.schemaId(SchemaId.INVALID); this.schemaId(SchemaId.INVALID);
@@ -0,0 +1,83 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.cosmos.core;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
public class Utf8StringTest {
@Test
public void testIsEmpty() {
}
@Test
public void testIsNull() {
}
@Test
public void testChars() {
}
@Test
public void testCodePoints() {
}
@Test
public void testCompareTo() {
}
@Test
public void testTestCompareTo() {
}
@Test
public void testEncodedLength() {
}
@Test
public void testTestEquals() {
}
@Test
public void testTestEquals1() {
}
@Test
public void testTestEquals2() {
}
@Test
public void testTestEquals3() {
}
@Test
public void testFrom() {
}
@Test
public void testFromUnsafe() {
}
@Test
public void testTestHashCode() {
}
@Test
public void testLength() {
}
@Test
public void testTestToString() {
}
@Test
public void testToUtf16() {
}
@Test
public void testTranscodeUtf16() {
}
}
@@ -0,0 +1,75 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.cosmos.core;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
public class UtfAnyStringTest {
@Test
public void testIsEmpty() {
}
@Test
public void testIsNull() {
}
@Test
public void testIsUtf16() {
}
@Test
public void testIsUtf8() {
}
@Test
public void testCompareTo() {
}
@Test
public void testTestCompareTo() {
}
@Test
public void testTestCompareTo1() {
}
@Test
public void testTestEquals() {
}
@Test
public void testTestEquals1() {
}
@Test
public void testTestEquals2() {
}
@Test
public void testTestEquals3() {
}
@Test
public void testTestHashCode() {
}
@Test
public void testLength() {
}
@Test
public void testTestToString() {
}
@Test
public void testToUtf16() {
}
@Test
public void testToUtf8() {
}
}