File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -303,14 +303,11 @@ TableScanBuilder& TableScanBuilder::UseRef(const std::string& ref) {
303303 " Cannot override ref, already set snapshot id={}" ,
304304 context_.snapshot_id .value ());
305305 auto iter = metadata_->refs .find (ref);
306- if (iter != metadata_->refs .end ()) {
307- ICEBERG_BUILDER_CHECK (iter->second != nullptr , " Ref {} is null" , ref);
308- int32_t snapshot_id = iter->second ->snapshot_id ;
309- ICEBERG_BUILDER_ASSIGN_OR_RETURN (std::ignore, metadata_->SnapshotById (snapshot_id));
310- context_.snapshot_id = snapshot_id;
311- } else {
312- return AddError (InvalidArgument (" Cannot find ref {}" , ref));
313- }
306+ ICEBERG_BUILDER_CHECK (iter != metadata_->refs .end (), " Cannot find ref {}" , ref);
307+ ICEBERG_BUILDER_CHECK (iter->second != nullptr , " Ref {} is null" , ref);
308+ int32_t snapshot_id = iter->second ->snapshot_id ;
309+ ICEBERG_BUILDER_ASSIGN_OR_RETURN (std::ignore, metadata_->SnapshotById (snapshot_id));
310+ context_.snapshot_id = snapshot_id;
314311
315312 return *this ;
316313}
You can’t perform that action at this time.
0 commit comments