Skip to content

Commit

Permalink
chore: fix typo (#19699)
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida authored Apr 14, 2022
1 parent 5fc0651 commit 8865656
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 8865656

Please sign in to comment.