codeant-ai-for-open-source[bot] commented on code in PR #45801:
URL: https://github.com/apache/superset/pull/45801#discussion_r4430678217
##########
superset/db_engine_specs/base.py:
##########
@@ -2701,11 +2711,16 @@ def make_label_compatible(cls, label: str) -> str |
quoted_name:
:return: conditionally mutated label supported by the db engine
"""
label_mutated = cls._mutate_label(label)
+ max_column_name_length = (
+ cls.get_max_column_name_length(database)
+ if database is not None
+ else cls.max_column_name_length
+ )
if (
- cls.max_column_name_length
- and len(label_mutated) > cls.max_column_name_length
+ max_column_name_length
+ and len(label_mutated) > max_column_name_length
):
- label_mutated = cls._truncate_label(label)
+ label_mutated = cls._truncate_label(label, max_column_name_length)
Review Comment:
✅ **CodeAnt verified this suggestion was addressed in subsequent commits and
marked this thread resolved** as of `83f9385`.
The truncation call passes only `label`, matching the one-parameter
`_truncate_label` overrides.
<sub>If that's not right, unresolve this thread and CodeAnt will leave it
open.</sub>
<!-- codeant-auto-resolve-reply -->
--
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]