@@ -23,6 +23,9 @@ use std::{cell, io, result, str};
2323#[ cfg( feature = "arrow" ) ]
2424use arrow_schema:: ArrowError ;
2525
26+ /// Parquet error enumeration
27+ // Note: we don't implement PartialEq as the semantics for the
28+ // external variant are not well defined (#4469)
2629#[ derive( Debug ) ]
2730pub enum ParquetError {
2831 /// General Parquet error.
@@ -44,23 +47,6 @@ pub enum ParquetError {
4447 External ( Box < dyn Error + Send + Sync > ) ,
4548}
4649
47- impl PartialEq for ParquetError {
48- fn eq ( & self , other : & Self ) -> bool {
49- match ( self , other) {
50- ( Self :: General ( l0) , Self :: General ( r0) ) => l0 == r0,
51- ( Self :: NYI ( l0) , Self :: NYI ( r0) ) => l0 == r0,
52- ( Self :: EOF ( l0) , Self :: EOF ( r0) ) => l0 == r0,
53- #[ cfg( feature = "arrow" ) ]
54- ( Self :: ArrowError ( l0) , Self :: ArrowError ( r0) ) => l0 == r0,
55- ( Self :: IndexOutOfBound ( l0, l1) , Self :: IndexOutOfBound ( r0, r1) ) => {
56- l0 == r0 && l1 == r1
57- }
58- ( Self :: External ( l0) , Self :: External ( r0) ) => l0. to_string ( ) == r0. to_string ( ) ,
59- _ => false ,
60- }
61- }
62- }
63-
6450impl std:: fmt:: Display for ParquetError {
6551 fn fmt ( & self , fmt : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
6652 match & self {
0 commit comments