Skip to content

Commit 902e20e

Browse files
committed
remove unused
1 parent 955a2ee commit 902e20e

2 files changed

Lines changed: 4 additions & 48 deletions

File tree

pyiceberg/io/pyarrow.py

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -426,32 +426,6 @@ def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> FileSyste
426426
else:
427427
raise ValueError(f"Unrecognized filesystem type in URI: {scheme}")
428428

429-
def _process_basic_properties(
430-
self, property_mapping: Dict[str, str], special_properties: Set[str], prefix: str
431-
) -> Dict[str, Any]:
432-
"""Process basic property mappings and prefix passthrough logic."""
433-
client_kwargs: Dict[str, Any] = {}
434-
435-
for prop_name, prop_value in self.properties.items():
436-
if prop_value is None:
437-
continue
438-
439-
# Skip properties that need special handling
440-
if prop_name in special_properties:
441-
continue
442-
443-
# Map known property names to filesystem parameter names
444-
if prop_name in property_mapping:
445-
param_name = property_mapping[prop_name]
446-
client_kwargs[param_name] = prop_value
447-
448-
# Pass through any other {prefix}.* properties
449-
elif prop_name.startswith(f"{prefix}."):
450-
param_name = prop_name.split(".", 1)[1]
451-
client_kwargs[param_name] = prop_value
452-
453-
return client_kwargs
454-
455429
def _get_first_property_value_with_tracking(self, props: Properties, used_keys: set[str], *keys: str) -> Optional[Any]:
456430
"""Tracks all candidate keys and returns the first value found."""
457431
used_keys.update(keys)
@@ -676,9 +650,11 @@ def _initialize_gcs_fs(self) -> FileSystem:
676650
url_parts = urlparse(endpoint)
677651
client_kwargs["scheme"] = url_parts.scheme
678652
client_kwargs["endpoint_override"] = url_parts.netloc
679-
if scheme := get("gcs.scheme") and "scheme" not in client_kwargs:
653+
if scheme := get("gcs.scheme") and "scheme" not in client_kwargs: # GCS_SERVICE_HOST takes precedence
680654
client_kwargs["scheme"] = scheme
681-
if endpoint_override := get("gcs.endpoint_override") and "endpoint_override" not in client_kwargs:
655+
if (
656+
endpoint_override := get("gcs.endpoint_override") and "endpoint_override" not in client_kwargs
657+
): # GCS_SERVICE_HOST takes precedence
682658
client_kwargs["endpoint_override"] = endpoint_override
683659

684660
if project_id := get(GCS_PROJECT_ID, "gcs.project_id"):

pyiceberg/utils/properties.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,6 @@ def get_header_properties(
8686
return {key[header_prefix_len:]: value for key, value in properties.items() if key.startswith(HEADER_PREFIX)}
8787

8888

89-
def properties_with_prefix(
90-
properties: Properties,
91-
prefix: str,
92-
) -> Properties:
93-
"""
94-
Return subset of provided map with keys matching the provided prefix. Matching is case-sensitive and the matching prefix is removed from the keys in returned map.
95-
96-
Args:
97-
properties: input map
98-
prefix: prefix to choose keys from input map
99-
100-
Returns:
101-
subset of input map with keys starting with provided prefix and prefix trimmed out
102-
"""
103-
if not properties:
104-
return {}
105-
106-
return {key[len(prefix) :]: value for key, value in properties.items() if key.startswith(prefix)}
107-
108-
10989
def filter_properties(
11090
properties: Properties,
11191
key_predicate: Callable[[str], bool],

0 commit comments

Comments
 (0)