bito-code-review[bot] commented on code in PR #38174:
URL: https://github.com/apache/superset/pull/38174#discussion_r3330208628
##########
requirements/base.in:
##########
@@ -48,3 +48,6 @@ openapi-schema-validator>=0.6.3
# Known affected packages: Preset's 'clients' package
# See docs/docs/contributing/pkg-resources-migration.md for details
setuptools<81
+
+# ODPS (MaxCompute) data source support
+pyodps>=0.12.2
Review Comment:
<!-- Bito Reply -->
This question isn’t related to the pull request. I can only help with
questions about the PR’s code or comments.
##########
superset/databases/api.py:
##########
@@ -1079,15 +1079,32 @@ def table_metadata(self, pk: int) -> FlaskResponse:
parameters = QualifiedTableSchema().load(request.args)
except ValidationError as ex:
raise InvalidPayloadSchemaError(ex) from ex
-
- table = Table(parameters["name"], parameters["schema"],
parameters["catalog"])
+ table_name = str(parameters["name"])
+ table = Table(table_name, parameters["schema"], parameters["catalog"])
try:
security_manager.raise_for_access(database=database, table=table)
except SupersetSecurityException as ex:
# instead of raising 403, raise 404 to hide table existence
raise TableNotFoundException("No such table") from ex
+ try:
+ is_partitioned_table, partition_fields = (
+ DatabaseDAO.is_odps_partitioned_table(database, table_name)
+ )
+ except Exception as ex: # pylint: disable=broad-except
Review Comment:
<!-- Bito Reply -->
This question isn’t related to the pull request. I can only help with
questions about the PR’s code or comments.
--
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]