You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What changes are proposed in this pull request?
Adds a new `UCCommitter` for writing to tables in UC (in `uc-catalog`
crate for now, final resting place TBD).
Additionally, adds the following RW table features in supported writer
features (did we never enable `V2Checkpoint` write?)
- `VacuumProtocolCheck`
- `V2Checkpoint`
- `CatalogManaged` (behind `catalog-managed` feature flag)
- `CatalogOwnedPreview` (behind `catalog-managed` feature flag)
## How was this change tested?
added an ignored test to write to cc tables; run with `ENDPOINT=".."
TABLENAME=".." TOKEN=".." cargo t write_uc_table --nocapture --
--ignored`
let table_root = Url::parse("memory:///").unwrap();
214
235
let engine = DefaultEngine::new(storage.clone());
@@ -225,18 +246,16 @@ mod tests {
225
246
let snapshot = crate::snapshot::SnapshotBuilder::new_for(table_root)
226
247
.build(&engine)
227
248
.unwrap();
228
-
// Try to create a transaction with FileSystemCommitter
249
+
// Try to commit a transaction with FileSystemCommitter
229
250
let committer = Box::new(FileSystemCommitter::new());
230
-
let err = snapshot.transaction(committer).unwrap_err();
251
+
let err = snapshot
252
+
.transaction(committer)
253
+
.unwrap()
254
+
.commit(&engine)
255
+
.unwrap_err();
231
256
assert!(matches!(
232
257
err,
233
-
crate::Error::Unsupported(e)if e.contains("Writes are not yet supported for catalog-managed tables")
258
+
crate::Error::Generic(e)if e.contains("The FileSystemCommitter cannot be used to commit to catalog-managed tables. Please provide a committer for your catalog via Transaction::with_committer().")
234
259
));
235
-
// after allowing writes, we will check that this disallows default committer for
236
-
// catalog-managed tables.
237
-
// assert!(matches!(
238
-
// err,
239
-
// crate::Error::Generic(e) if e.contains("Cannot use the default committer for a catalog-managed table")
Copy file name to clipboardExpand all lines: kernel/src/transaction/mod.rs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -316,7 +316,7 @@ impl Transaction {
316
316
returnErr(Error::generic("The FileSystemCommitter cannot be used to commit to catalog-managed tables. Please provide a committer for your catalog via Transaction::with_committer()."));
317
317
}
318
318
let log_root = LogRoot::new(self.read_snapshot.table_root().clone())?;
319
-
let commit_metadata = CommitMetadata::new(log_root, commit_version);
319
+
let commit_metadata = CommitMetadata::new(log_root, commit_version,self.commit_timestamp);
0 commit comments