You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2025/06/26 21:25:08 UTC
(superset) 01/01: fix(dremio): apply same fix as for drill to solve alias ambiguity
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch fix_dremio
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 513ab67b8f17942506d138504d969e0f08881803
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Thu Jun 26 14:24:34 2025 -0700
fix(dremio): apply same fix as for drill to solve alias ambiguity
---
superset/db_engine_specs/dremio.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/superset/db_engine_specs/dremio.py b/superset/db_engine_specs/dremio.py
index 1f4338830b..39fe48be63 100644
--- a/superset/db_engine_specs/dremio.py
+++ b/superset/db_engine_specs/dremio.py
@@ -25,6 +25,7 @@ from sqlalchemy import types
from superset.constants import TimeGrain
from superset.db_engine_specs.base import BaseEngineSpec
+from superset.utils.hashing import md5_sha_from_str
if TYPE_CHECKING:
from superset.models.core import Database
@@ -93,3 +94,14 @@ class DremioEngineSpec(BaseEngineSpec):
dttm_formatted = dttm.isoformat(sep=" ", timespec="milliseconds")
return f"""TO_TIMESTAMP('{dttm_formatted}', 'YYYY-MM-DD HH24:MI:SS.FFF')"""
return None
+
+ @staticmethod
+ def _mutate_label(label: str) -> str:
+ """
+ Suffix with the first six characters from the md5 of the label to avoid
+ collisions with original column names
+
+ :param label: Expected expression label
+ :return: Conditionally mutated label
+ """
+ return f"{label}_{md5_sha_from_str(label)[:6]}"