zeroshade commented on code in PR #1441:
URL: https://github.com/apache/iceberg-go/pull/1441#discussion_r3566743356


##########
catalog/hive/hive.go:
##########
@@ -852,8 +852,11 @@ func (c *Catalog) getIcebergTable(ctx context.Context, 
database, tableName strin
 }
 
 func identifierToTableName(identifier table.Identifier) (string, string, 
error) {
+       if err := catalog.ValidateTableIdentifier(identifier); err != nil {

Review Comment:
   `identifierToTableName` now returns `ErrNoSuchTable` on an invalid 
identifier, but this helper is also used by the Hive view operations (e.g. 
`LoadView`/`DropView`/`CheckViewExists` at lines ~257 and ~574). Those callers 
— and their tests — branch on `ErrNoSuchView`, so an invalid *view* identifier 
will now surface `ErrNoSuchTable` instead. Consider splitting into a view 
variant (using `ValidateViewIdentifier` and returning `ErrNoSuchView`), or 
parameterizing the not-found error passed into the validation path.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to