1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// Copyright 2025 Adobe. All rights reserved.
// This file is licensed to you under the Apache License,
// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
// or the MIT license (http://opensource.org/licenses/MIT),
// at your option.
//
// Unless required by applicable law or agreed to in writing,
// this software is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
// specific language governing permissions and limitations under
// each license.
use crateHealthMetrics;
use crateFileMetadata;
use async_trait;
use Error;
/// Trait for table format-specific analyzers.
///
/// This trait defines the interface that all table format analyzers (Delta, Iceberg, etc.)
/// must implement. It provides three core operations:
/// 1. Categorizing files into data files and metadata files
/// 2. Finding referenced files from metadata
/// 3. Updating health metrics from metadata
///
/// # Design Philosophy
///
/// This trait enables a strategy pattern where the main `Analyzer` can work with any
/// table format without knowing the specific implementation details. When adding support
/// for a new table format (e.g., Iceberg, Hudi), simply:
/// 1. Create a new analyzer struct (e.g., `IcebergAnalyzer`)
/// 2. Implement this trait for it
/// 3. Update the factory logic in `Analyzer::analyze()` to instantiate it
///
/// No changes to the main analysis logic are required.