Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: naming denomalized to denormalized in helpers.py #25973

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions superset/models/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,11 +1343,11 @@
def values_for_column(self, column_name: str, limit: int = 10000) -> list[Any]:
# always denormalize column name before querying for values
db_dialect = self.database.get_dialect()
denomalized_col_name = self.database.db_engine_spec.denormalize_name(
denormalized_col_name = self.database.db_engine_spec.denormalize_name(

Check warning on line 1346 in superset/models/helpers.py

View check run for this annotation

Codecov / codecov/patch

superset/models/helpers.py#L1346

Added line #L1346 was not covered by tests
db_dialect, column_name
)
cols = {col.column_name: col for col in self.columns}
target_col = cols[denomalized_col_name]
target_col = cols[denormalized_col_name]

Check warning on line 1350 in superset/models/helpers.py

View check run for this annotation

Codecov / codecov/patch

superset/models/helpers.py#L1350

Added line #L1350 was not covered by tests
tp = self.get_template_processor()
tbl, cte = self.get_from_clause(tp)

Expand All @@ -1368,7 +1368,7 @@
sql = self.mutate_query_from_config(sql)

df = pd.read_sql_query(sql=sql, con=engine)
return df[denomalized_col_name].to_list()
return df[denormalized_col_name].to_list()

Check warning on line 1371 in superset/models/helpers.py

View check run for this annotation

Codecov / codecov/patch

superset/models/helpers.py#L1371

Added line #L1371 was not covered by tests

def get_timestamp_expression(
self,
Expand Down
Loading