File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ def __eq__(self, other: object) -> bool:
7070 return NotImplemented
7171 return self .image_hash == other .image_hash and self .repository == other .repository
7272
73+ def to_schema (self ) -> str :
74+ """Schema reference for the given image."""
75+ return self .repository .to_schema () + ":" + self .image_hash
76+
7377 def get_parent_children (self ) -> Tuple [Optional [str ], List [str ]]:
7478 """Gets the parent and a list of children of a given image."""
7579 parent = self .parent_id
@@ -117,8 +121,7 @@ def get_table(self, table_name: str) -> Table:
117121 )
118122 if not result :
119123 raise TableNotFoundError (
120- "Image %s:%s does not have a table %s!"
121- % (self .repository , self .image_hash , table_name )
124+ "Image %s does not have a table %s!" % (self .to_schema (), table_name )
122125 )
123126 table_schema , objects = result
124127 return Table (
@@ -212,9 +215,8 @@ def lq_checkout(
212215 continue
213216
214217 logging .debug (
215- "Mounting %s:%s/%s into %s" ,
216- self .repository .to_schema (),
217- self .image_hash ,
218+ "Mounting %s/%s into %s" ,
219+ self .to_schema (),
218220 table_name ,
219221 target_schema ,
220222 )
You can’t perform that action at this time.
0 commit comments