arrow-julia icon indicating copy to clipboard operation
arrow-julia copied to clipboard

Arrow Table doesn't implement `==` for value equality

Open NHDaly opened this issue 3 years ago • 1 comments

I was surprised by this when I was writing a unit test that a function returned the expected structure.

For example:

julia> t = let io = IOBuffer(); Arrow.write(io, (v1=collect(1:10),)); seekstart(io); Arrow.Table(io) end
Arrow.Table with 10 rows, 1 columns, and schema:
 :v1  Int64

julia> t2 = let io = IOBuffer(); Arrow.write(io, (v1=collect(1:10),)); seekstart(io); Arrow.Table(io) end
Arrow.Table with 10 rows, 1 columns, and schema:
 :v1  Int64

julia> t == t2
false

Is the reason for this because it would be too expensive? I think users generally understand that == on large collections is expensive and should probably be avoided. Or is it because we don't want to have to implement an expensive hash() function, and we'd have to do that if we implement ==?

Thanks! :)

NHDaly avatar Mar 28 '22 14:03 NHDaly

Yeah, I'd like for this to be defined. DataFrames has a pretty decent definition that I think we could copy.

quinnj avatar Apr 09 '22 22:04 quinnj