mirror of
https://github.com/apache/superset.git
synced 2026-05-08 01:15:46 +00:00
feat(advanced analysis): support MultiIndex column in post processing stage (#19116)
This commit is contained in:
committed by
Ville Brofeldt
parent
f8a92de75c
commit
9bc76337cf
@@ -16,7 +16,7 @@
|
||||
# under the License.
|
||||
import pytest
|
||||
|
||||
from superset.exceptions import QueryObjectValidationError
|
||||
from superset.exceptions import InvalidPostProcessingError
|
||||
from superset.utils.pandas_postprocessing.select import select
|
||||
from tests.unit_tests.fixtures.dataframes import timeseries_df
|
||||
|
||||
@@ -47,9 +47,9 @@ def test_select():
|
||||
assert post_df.columns.tolist() == ["y1"]
|
||||
|
||||
# invalid columns
|
||||
with pytest.raises(QueryObjectValidationError):
|
||||
with pytest.raises(InvalidPostProcessingError):
|
||||
select(df=timeseries_df, columns=["abc"], rename={"abc": "qwerty"})
|
||||
|
||||
# select renamed column by new name
|
||||
with pytest.raises(QueryObjectValidationError):
|
||||
with pytest.raises(InvalidPostProcessingError):
|
||||
select(df=timeseries_df, columns=["label_new"], rename={"label": "label_new"})
|
||||
|
||||
Reference in New Issue
Block a user