This is an automated email from the ASF dual-hosted git repository.

kevinjqliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-python.git


The following commit(s) were added to refs/heads/main by this push:
     new d4e1abf8 Remove unused code (#3326)
d4e1abf8 is described below

commit d4e1abf8b49d4e0e4f832aada6ecc29c16f2a3d7
Author: Yuya Ebihara <[email protected]>
AuthorDate: Thu May 7 02:35:40 2026 +0900

    Remove unused code (#3326)
    
    <!--
    Thanks for opening a pull request!
    -->
    
    <!-- In the case this PR will resolve an issue, please replace
    ${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
    <!-- Closes #${GITHUB_ISSUE_ID} -->
    
    # Rationale for this change
    
    Remove unused code
    
    ## Are these changes tested?
    
    N/A
    
    ## Are there any user-facing changes?
    
    No
    
    <!-- In the case of user-facing changes, please add the changelog label.
    -->
---
 pyiceberg/catalog/bigquery_metastore.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/pyiceberg/catalog/bigquery_metastore.py 
b/pyiceberg/catalog/bigquery_metastore.py
index 6568e29a..339d4715 100644
--- a/pyiceberg/catalog/bigquery_metastore.py
+++ b/pyiceberg/catalog/bigquery_metastore.py
@@ -132,7 +132,6 @@ class BigQueryMetastoreCatalog(MetastoreCatalog):
 
         dataset_name, table_name = 
self.identifier_to_database_and_table(identifier)
 
-        dataset_ref = DatasetReference(project=self.project_id, 
dataset_id=dataset_name)
         location = self._resolve_table_location(location, dataset_name, 
table_name)
         provider = load_location_provider(table_location=location, 
table_properties=properties)
         metadata_location = provider.new_table_metadata_file_location()
@@ -172,9 +171,7 @@ class BigQueryMetastoreCatalog(MetastoreCatalog):
         try:
             dataset_ref = DatasetReference(project=self.project_id, 
dataset_id=database_name)
             dataset = Dataset(dataset_ref=dataset_ref)
-            dataset.external_catalog_dataset_options = 
self._create_external_catalog_dataset_options(
-                
self._get_default_warehouse_location_for_dataset(database_name), properties, 
dataset_ref
-            )
+            dataset.external_catalog_dataset_options = 
self._create_external_catalog_dataset_options(properties, dataset_ref)
             self.client.create_dataset(dataset)
         except Conflict as e:
             raise NamespaceAlreadyExistsError("Namespace {database_name} 
already exists") from e
@@ -195,7 +192,6 @@ class BigQueryMetastoreCatalog(MetastoreCatalog):
         Raises:
             NoSuchTableError: If a table with the name does not exist, or the 
identifier is invalid.
         """
-        database_name, table_name = 
self.identifier_to_database_and_table(identifier, NoSuchTableError)
         dataset_name, table_name = 
self.identifier_to_database_and_table(identifier, NoSuchTableError)
 
         try:
@@ -363,7 +359,7 @@ class BigQueryMetastoreCatalog(MetastoreCatalog):
         )
 
     def _create_external_catalog_dataset_options(
-        self, default_storage_location: str, metadataParameters: dict[str, 
Any], dataset_ref: DatasetReference
+        self, metadataParameters: dict[str, Any], dataset_ref: DatasetReference
     ) -> ExternalCatalogDatasetOptions:
         return ExternalCatalogDatasetOptions(
             
default_storage_location_uri=self._get_default_warehouse_location_for_dataset(dataset_ref.dataset_id),

Reply via email to