korbit-ai[bot] commented on code in PR #32556:
URL: https://github.com/apache/superset/pull/32556#discussion_r1986526799
##########
superset/daos/database.py:
##########
@@ -166,6 +170,37 @@
return ssh_tunnel
+ @classmethod
+ def is_odps_partitioned_table(
+ cls, database: Database, table_name: str
+ ) -> Tuple[bool, List[str]]:
+ """
+ This function is used to determine and retrieve
+ partition information of the odsp table.
+ The return values are whether the partition
+ table is partitioned and the names of all partition fields.
+ """
+ if not database:
+ raise ValueError("Database not found")
+ uri = database.sqlalchemy_uri
+ access_key = database.password
+ pattern = re.compile(
+
r"odps://(?P<username>[^:]+):(?P<password>[^@]+)@(?P<project>[^/]+)/(?:\?endpoint=(?P<endpoint>[^&]+))"
+ )
Review Comment:
Thank you for your response @zhutong6688. The intention behind the comment
was to make this regular expression more readable for other developers,
especially new ones who might start maintaining your code in the future. Adding
comments and breaking it down makes it more understandable and thus aids in
easier debugging and maintenance. I totally understand if you feel the
expression is self-explanatory in this context, and I appreciate your rationale
behind it.
--
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]