mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
chore: fix typo (#19699)
This commit is contained in:
parent
5fc0651aab
commit
8865656e06
@ -52,7 +52,7 @@ from superset.utils.core import (
|
||||
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
|
||||
@ -289,7 +289,7 @@ class QueryContextProcessor:
|
||||
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", [])
|
||||
)
|
||||
|
@ -128,7 +128,7 @@ DTTM_ALIAS = "__timestamp"
|
||||
|
||||
NO_TIME_RANGE = "No filter"
|
||||
|
||||
TIME_COMPARISION = "__"
|
||||
TIME_COMPARISON = "__"
|
||||
|
||||
JS_MAX_INTEGER = 9007199254740991 # Largest int Java Script can handle 2^53-1
|
||||
|
||||
|
@ -22,7 +22,7 @@ from pandas import DataFrame
|
||||
|
||||
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
|
||||
|
||||
|
||||
@ -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,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user