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

chore: fix typo #19699

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions superset/common/query_context_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
get_column_names_from_metrics,
get_metric_names,
normalize_dttm_col,
TIME_COMPARISION,
TIME_COMPARISON,
)
from superset.utils.date_parser import get_past_or_future, normalize_time_delta
from superset.views.utils import get_viz
Expand Down Expand Up @@ -289,7 +289,7 @@ def processing_time_offsets( # pylint: disable=too-many-locals
query_object_clone_dct = query_object_clone.to_dict()
# rename metrics: SUM(value) => SUM(value) 1 year ago
metrics_mapping = {
metric: TIME_COMPARISION.join([metric, offset])
metric: TIME_COMPARISON.join([metric, offset])
for metric in get_metric_names(
query_object_clone_dct.get("metrics", [])
)
Expand Down
2 changes: 1 addition & 1 deletion superset/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

NO_TIME_RANGE = "No filter"

TIME_COMPARISION = "__"
TIME_COMPARISON = "__"

JS_MAX_INTEGER = 9007199254740991 # Largest int Java Script can handle 2^53-1

Expand Down
4 changes: 2 additions & 2 deletions superset/utils/pandas_postprocessing/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from superset.constants import PandasPostprocessingCompare
from superset.exceptions import InvalidPostProcessingError
from superset.utils.core import TIME_COMPARISION
from superset.utils.core import TIME_COMPARISON
from superset.utils.pandas_postprocessing.utils import validate_column_args


Expand Down Expand Up @@ -74,7 +74,7 @@ def compare( # pylint: disable=too-many-arguments

diff_df.rename(
columns={
"__intermediate": TIME_COMPARISION.join([compare_type, s_col, c_col])
"__intermediate": TIME_COMPARISON.join([compare_type, s_col, c_col])
},
inplace=True,
)
Expand Down