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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
//! View management for Apache Iceberg tables
//!
//! This module provides the core functionality for working with Iceberg views:
//!
//! - Creating and managing views through the [View] struct
//! - Atomic updates via [transaction] support
//! - Schema evolution and versioning
//! - View metadata management
//! - Integration with catalogs and object stores
//!
//! Views provide a logical abstraction over underlying data, supporting:
//! - SQL-based view definitions
//! - Schema evolution tracking
//! - Version history
//! - Properties and configuration
//! - Metadata management
//!
//! # Example
//! ```rust,no_run
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! use iceberg_rust::view::View;
//!
//! // Create a new view using the builder pattern
//! let mut view = View::builder()
//! .with_name("example_view")
//! .with_schema(/* ... */)
//! .build()
//! .await?;
//!
//! // Start a transaction to update the view
//! view.new_transaction(None)
//! .update_properties(vec![("comment".into(), "Example view".into())])
//! .commit()
//! .await?;
//! # Ok(())
//! # }
//! ```
use Arc;
use ;
use crate::;
use Transaction as ViewTransaction;
/// An Iceberg view provides a logical view over underlying data with schema evolution and versioning
///
/// Views store:
/// - SQL query or other representation of the view logic
/// - Schema evolution history
/// - Version history for view definitions
/// - Properties for configuration
/// - Metadata about view location and catalog
///
/// Views can be either filesystem-based or managed by a metastore catalog.
/// They support transactions for atomic updates to their definition and properties.
///
/// The View struct provides the main interface for:
/// - Creating and managing views
/// - Accessing view metadata and schemas
/// - Starting transactions for atomic updates
/// - Interacting with the underlying storage system
/// Public interface of the table.