File tree Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Expand file tree Collapse file tree 4 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,15 @@ class IConstructor {
25
25
virtual TString DoDebugString () const {
26
26
return " " ;
27
27
}
28
+ virtual bool DoIsEqualWithSameTypeTo (const IConstructor& item) const = 0;
28
29
29
30
public:
30
31
virtual ~IConstructor () = default ;
31
32
33
+ bool IsEqualWithSameTypeTo (const IConstructor& item) const {
34
+ return DoIsEqualWithSameTypeTo (item);
35
+ }
36
+
32
37
TString DebugString () const {
33
38
return TStringBuilder () << GetClassName () << " :" << DoDebugString ();
34
39
}
@@ -69,6 +74,19 @@ class TConstructorContainer: public NBackgroundTasks::TInterfaceProtoContainer<I
69
74
public:
70
75
using TBase::TBase;
71
76
77
+ bool IsEqualTo (const TConstructorContainer& item) {
78
+ if (!GetObjectPtr () && !item.GetObjectPtr ()) {
79
+ return true ;
80
+ } else if (!!GetObjectPtr () && !!item.GetObjectPtr ()) {
81
+ if (GetObjectPtr ()->GetClassName () != item.GetObjectPtr ()->GetClassName ()) {
82
+ return false ;
83
+ }
84
+ return GetObjectPtr ()->IsEqualWithSameTypeTo (*item.GetObjectPtr ());
85
+ } else {
86
+ return false ;
87
+ }
88
+ }
89
+
72
90
static TConstructorContainer GetDefaultConstructor ();
73
91
};
74
92
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ class TConstructor: public IConstructor {
12
12
13
13
private:
14
14
static inline auto Registrator = TFactory::TRegistrator<TConstructor>(GetClassNameStatic());
15
+
16
+ virtual bool DoIsEqualWithSameTypeTo (const IConstructor& /* item*/ ) const override {
17
+ return true ;
18
+ }
19
+
15
20
virtual TConclusion<std::shared_ptr<NArrow::NAccessor::IChunkedArray>> DoConstruct (
16
21
const std::shared_ptr<arrow::RecordBatch>& originalData, const TChunkConstructionData& externalInfo) const override ;
17
22
virtual NKikimrArrowAccessorProto::TConstructor DoSerializeToProto () const override ;
Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ class TConstructor: public IConstructor {
12
12
13
13
private:
14
14
static inline auto Registrator = TFactory::TRegistrator<TConstructor>(GetClassNameStatic());
15
+
16
+ virtual bool DoIsEqualWithSameTypeTo (const IConstructor& /* item*/ ) const override {
17
+ return true ;
18
+ }
19
+
15
20
virtual TConclusion<std::shared_ptr<NArrow::NAccessor::IChunkedArray>> DoConstruct (
16
21
const std::shared_ptr<arrow::RecordBatch>& originalData, const TChunkConstructionData& externalInfo) const override ;
17
22
virtual NKikimrArrowAccessorProto::TConstructor DoSerializeToProto () const override ;
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ class TColumnLoader {
34
34
if (!Serializer.IsEqualTo (item.Serializer )) {
35
35
return false ;
36
36
}
37
+ if (!AccessorConstructor->IsEqualTo (item.AccessorConstructor )) {
38
+ return false ;
39
+ }
40
+ if (NArrow::ScalarCompareNullable (DefaultValue, item.DefaultValue )) {
41
+ return false ;
42
+ }
37
43
return true ;
38
44
}
39
45
You can’t perform that action at this time.
0 commit comments