fix: add suffix to Drill labels to avoid collision (#32857)

Co-authored-by: Fredrik Hyyrynen <fredrik.hyyrynen@ngm.se>
Co-authored-by: Evan Rusackas <evan@rusackas.com>
Co-authored-by: pre-commit <pre-commit@users.noreply.github.com>
This commit is contained in:
Fredrik Hyyrynen
2025-06-26 20:28:05 +02:00
committed by GitHub
parent a56d7252c2
commit eec563b0b4
2 changed files with 28 additions and 0 deletions

View File

@@ -157,3 +157,19 @@ def test_get_schema_from_engine_params() -> None:
)
== "dfs.test"
)
@pytest.mark.parametrize(
"column_name,expected_result",
[
("time", "time_07cc69"),
("count", "count_e2942a"),
],
)
def test_connect_make_label_compatible(column_name: str, expected_result: str) -> None:
from superset.db_engine_specs.drill import (
DrillEngineSpec as spec, # noqa: N813
)
label = spec.make_label_compatible(column_name)
assert label == expected_result