kacpermuda commented on code in PR #40173:
URL: https://github.com/apache/airflow/pull/40173#discussion_r1675461319
##########
airflow/datasets/__init__.py:
##########
@@ -50,6 +50,13 @@ def _get_uri_normalizer(scheme: str) ->
Callable[[SplitResult], SplitResult] | N
return ProvidersManager().dataset_uri_handlers.get(scheme)
+def _get_normalized_scheme(uri: str) -> str | None:
+ parsed = urllib.parse.urlsplit(uri)
+ if not parsed.scheme:
+ return None
Review Comment:
The reason behind a separate function was that i did not feel comfortable
just re-using the `parsed.scheme.lower()`. I felt like this logic can easily be
changed here and we will not be aware of it in the provider, so by creating
another layer we can all use the same function. This conversion to None makes
no sense and I'll remove it, but the separate function makes sense to me as we
start using this normalized scheme as a key in multiple places.
--
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]