Skip to content

[C#] Expose method to compare 2 Tables #46464

Open
@andrewshandy

Description

@andrewshandy

Describe the enhancement requested

Motivation

I am working on integration tests where I am testing that a service returns an arrow table that equals to an expected arrow table.

Feature

Expose a method that compares 2 Tables

Considerations

I see that there's an ArrowReaderVerifier class that does have some similar functionality here to compare record batches -

public static void CompareBatches(RecordBatch expectedBatch, RecordBatch actualBatch, bool strictCompare = true)
{
SchemaComparer.Compare(expectedBatch.Schema, actualBatch.Schema);
Assert.Equal(expectedBatch.Length, actualBatch.Length);
Assert.Equal(expectedBatch.ColumnCount, actualBatch.ColumnCount);
for (int i = 0; i < expectedBatch.ColumnCount; i++)
{
IArrowArray expectedArray = expectedBatch.Arrays.ElementAt(i);
IArrowArray actualArray = actualBatch.Arrays.ElementAt(i);
CompareArrays(expectedArray, actualArray, strictCompare);
}
}

But as far as I understand Apache.Arrow.Tests namespace is not publicly available. Is that correct? Is it possible to expose some of the methods from it to be public?

Component(s)

C#

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions