Skip to content

Commit

Permalink
apacheGH-38942: [C#] Fix spelling (apache#38943)
Browse files Browse the repository at this point in the history
### Rationale for this change

### What changes are included in this PR?

Spelling fixes to csharp/

### Are these changes tested?

### Are there any user-facing changes?

* Closes: apache#38942

Authored-by: Josh Soref <[email protected]>
Signed-off-by: Curt Hagenlocher <[email protected]>
  • Loading branch information
jsoref authored Nov 30, 2023
1 parent d66780d commit 70e19f0
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion csharp/src/Apache.Arrow/ArrowBuffer.BitmapBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public BitmapBuilder Append(bool value)
public BitmapBuilder Append(ReadOnlySpan<byte> source, int validBits)
{
if (!source.IsEmpty && validBits > source.Length * 8)
throw new ArgumentException($"Number of valid bits ({validBits}) cannot be greater than the the source span length ({source.Length * 8} bits).", nameof(validBits));
throw new ArgumentException($"Number of valid bits ({validBits}) cannot be greater than the source span length ({source.Length * 8} bits).", nameof(validBits));

// Check if memory copy can be used from the source array (performance optimization for byte-aligned coping)
if (!source.IsEmpty && Length % 8 == 0)
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Apache.Arrow/Flatbuf/FlatBuffers/ByteBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static int SizeOf<T>()
/// Checks if the Type provided is supported as scalar value
/// </summary>
/// <typeparam name="T">The Type to check</typeparam>
/// <returns>True if the type is a scalar type that is supported, falsed otherwise</returns>
/// <returns>True if the type is a scalar type that is supported, false otherwise</returns>
public static bool IsSupportedType<T>()
{
return genericSizes.ContainsKey(typeof(T));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public FlatBufferBuilder(int initialSize)
}

/// <summary>
/// Create a FlatBufferBuilder backed by the pased in ByteBuffer
/// Create a FlatBufferBuilder backed by the passed in ByteBuffer
/// </summary>
/// <param name="buffer">The ByteBuffer to write to</param>
public FlatBufferBuilder(ByteBuffer buffer)
Expand Down Expand Up @@ -474,7 +474,7 @@ public VectorOffset CreateVectorOfTables<T>(Offset<T>[] offsets) where T : struc
return EndVector();
}

/// @cond FLATBUFFERS_INTENRAL
/// @cond FLATBUFFERS_INTERNAL
public void Nested(int obj)
{
// Structs are always stored inline, so need to be created right
Expand Down
16 changes: 8 additions & 8 deletions csharp/src/Apache.Arrow/Flatbuf/FlatBuffers/FlatBufferVerify.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Verifier()

/// <summary> The Constructor of the Verifier object with input parameters: ByteBuffer and/or Options </summary>
/// <param name="buf"> Input flat byte buffer defined as ByteBuffer type</param>
/// <param name="options"> Options object with settings for the coniguration the Verifier </param>
/// <param name="options"> Options object with settings for the configuration the Verifier </param>
public Verifier(ByteBuffer buf, Options options = null)
{
verifier_buffer = buf;
Expand Down Expand Up @@ -261,7 +261,7 @@ private short GetVRelOffset(int pos, short vtableOffset)

}
/// <summary> Get table data area absolute offset from vtable. Result is the absolute buffer offset.
/// The result value offset cannot be '0' (pointing to itself) so after validation this method returnes '0'
/// The result value offset cannot be '0' (pointing to itself) so after validation this method returns '0'
/// value as a marker for missing optional entry </summary>
/// <param name="tablePos"> Table Position value in the Byte Buffer </param>
/// <param name="vtableOffset"> offset value in the Table</param>
Expand All @@ -273,7 +273,7 @@ private uint GetVOffset(uint tablePos, short vtableOffset)
short relPos = GetVRelOffset(Convert.ToInt32(tablePos), vtableOffset);
if (relPos != 0)
{
// Calculate offset based on table postion
// Calculate offset based on table position
UOffset = Convert.ToUInt32(tablePos + relPos);
}
else
Expand Down Expand Up @@ -482,7 +482,7 @@ public bool VerifyTableEnd(uint tablePos)
return true;
}

/// <summary> Verifiy static/inlined data area field </summary>
/// <summary> Verify static/inlined data area field </summary>
/// <param name="tablePos"> Position in the Table</param>
/// <param name="offsetId"> Offset to the static/inlined data element </param>
/// <param name="elementSize"> Size of the element </param>
Expand Down Expand Up @@ -633,17 +633,17 @@ public bool VerifyNestedBuffer(uint tablePos, short offsetId, VerifyTableAction
var vecStart = vecOffset + SIZE_U_OFFSET;
// Create and Copy nested buffer bytes from part of Verify Buffer
var nestedByteBuffer = new ByteBuffer(verifier_buffer.ToArray(Convert.ToInt32(vecStart), Convert.ToInt32(vecLength)));
var nestedVerifyier = new Verifier(nestedByteBuffer, options);
var nestedVerifier = new Verifier(nestedByteBuffer, options);
// There is no internal identifier - use empty one
if (!nestedVerifyier.CheckBufferFromStart("", 0, verifyAction))
if (!nestedVerifier.CheckBufferFromStart("", 0, verifyAction))
{
return false;
}
}
return true;
}

/// <summary> Verifiy static/inlined data area at absolute offset </summary>
/// <summary> Verify static/inlined data area at absolute offset </summary>
/// <param name="pos"> Position of static/inlined data area in the Byte Buffer</param>
/// <param name="elementSize"> Size of the union data</param>
/// <param name="align"> Alignment bool value </param>
Expand Down Expand Up @@ -705,7 +705,7 @@ public bool VerifyUnion(uint tablePos, short typeIdVOffset, short valueVOffset,
/// <summary> Verify vector of unions (objects). Unions are verified using generated verifyObjFunc </summary>
/// <param name="tablePos"> Position of the Table</param>
/// <param name="typeOffsetId"> Offset in the Table (Union type id)</param>
/// <param name="offsetId"> Offset to vector of Data Stucture offset</param>
/// <param name="offsetId"> Offset to vector of Data Structure offset</param>
/// <param name="verifyAction"> Verification Method used for Union</param>
/// <param name="required"> Required Value when the offset == 0 </param>
/// <returns>Return True when the verification of the Vector of Unions passed</returns>
Expand Down
6 changes: 3 additions & 3 deletions csharp/src/Apache.Arrow/Flatbuf/FlatBuffers/Table.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public int __vector(int offset)
}

#if ENABLE_SPAN_T && (UNSAFE_BYTEBUFFER || NETSTANDARD2_1)
// Get the data of a vector whoses offset is stored at "offset" in this object as an
// Get the data of a vector whose offset is stored at "offset" in this object as an
// Spant&lt;byte&gt;. If the vector is not present in the ByteBuffer,
// then an empty span will be returned.
public Span<T> __vector_as_span<T>(int offset, int elementSize) where T : struct
Expand All @@ -113,7 +113,7 @@ public Span<T> __vector_as_span<T>(int offset, int elementSize) where T : struct
return MemoryMarshal.Cast<byte, T>(bb.ToSpan(pos, len * elementSize));
}
#else
// Get the data of a vector whoses offset is stored at "offset" in this object as an
// Get the data of a vector whose offset is stored at "offset" in this object as an
// ArraySegment&lt;byte&gt;. If the vector is not present in the ByteBuffer,
// then a null value will be returned.
public ArraySegment<byte>? __vector_as_arraysegment(int offset)
Expand All @@ -130,7 +130,7 @@ public Span<T> __vector_as_span<T>(int offset, int elementSize) where T : struct
}
#endif

// Get the data of a vector whoses offset is stored at "offset" in this object as an
// Get the data of a vector whose offset is stored at "offset" in this object as an
// T[]. If the vector is not present in the ByteBuffer, then a null value will be
// returned.
public T[] __vector_as_array<T>(int offset)
Expand Down
2 changes: 1 addition & 1 deletion csharp/src/Apache.Arrow/Flatbuf/Types/Timestamp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace Apache.Arrow.Flatbuf
/// no indication of how to map this information to a physical point in time.
/// Naive date-times must be handled with care because of this missing
/// information, and also because daylight saving time (DST) may make
/// some values ambiguous or non-existent. A naive date-time may be
/// some values ambiguous or nonexistent. A naive date-time may be
/// stored as a struct with Date and Time fields. However, it may also be
/// encoded into a Timestamp column with an empty timezone. The timestamp
/// values should be computed "as if" the timezone of the date-time values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void BitsAreAppendedToEmptyBuilder(byte[] bytesToAppend,
[InlineData(new byte[] { 254 }, 4, 12, 11, 1)]
[InlineData(new byte[] { 254, 1 }, 9, 17, 16, 1)]
[InlineData(new byte[] { 249, 1 }, 9, 17, 15, 2)]
public void BitsAreAppendedToBuilderContainingByteAllignedData(byte[] bytesToAppend,
public void BitsAreAppendedToBuilderContainingByteAlignedData(byte[] bytesToAppend,
int validBits,
int expectedLength,
int expectedSetBitCount,
Expand All @@ -154,7 +154,7 @@ public void BitsAreAppendedToBuilderContainingByteAllignedData(byte[] bytesToApp
[InlineData(new byte[] { 254 }, 4, 13, 12, 1)]
[InlineData(new byte[] { 254, 1 }, 9, 18, 17, 1)]
[InlineData(new byte[] { 249, 1 }, 9, 18, 16, 2)]
public void BitsAreAppendedToBuilderContainingNotAllignedData(byte[] bytesToAppend,
public void BitsAreAppendedToBuilderContainingNotAlignedData(byte[] bytesToAppend,
int validBits,
int expectedLength,
int expectedSetBitCount,
Expand Down Expand Up @@ -369,7 +369,7 @@ public void CapacityIncreased(int initialCapacity, int numBitsToAppend, int addi
}

[Fact]
public void NegtativeCapacityThrows()
public void NegativeCapacityThrows()
{
// Arrange
var builder = new ArrowBuffer.BitmapBuilder();
Expand Down
4 changes: 2 additions & 2 deletions csharp/test/Apache.Arrow.Tests/ArrowFileWriterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void Ctor_LeaveOpenTrue_StreamValidOnDispose()
/// </summary>
/// <returns></returns>
[Fact]
public async Task WritesFooterAlignedMulitpleOf8()
public async Task WritesFooterAlignedMultipleOf8()
{
RecordBatch originalBatch = TestData.CreateSampleRecordBatch(length: 100);

Expand Down Expand Up @@ -85,7 +85,7 @@ public async Task WritesFooterAlignedMulitpleOf8()
/// </summary>
/// <returns></returns>
[Fact]
public async Task WritesFooterAlignedMulitpleOf8Async()
public async Task WritesFooterAlignedMultipleOf8Async()
{
RecordBatch originalBatch = TestData.CreateSampleRecordBatch(length: 100);

Expand Down

0 comments on commit 70e19f0

Please sign in to comment.