You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/11/01 14:56:07 UTC
[GitHub] [superset] zhaoyongjie opened a new pull request, #21993: [WIP]feat: Axis sort in the Bar Chart V2
zhaoyongjie opened a new pull request, #21993:
URL: https://github.com/apache/superset/pull/21993
### SUMMARY
This PR intends to introduce a new control, `XAxisSortControl`, and a new post-processing operator. The goal is to resolve whether the axis could be sorted by the `x-axis` or any metric.
<img width="1263" alt="image" src="https://user-images.githubusercontent.com/2016594/199261794-54689cbf-a22f-44ca-9bf3-748a18b3ab5f.png">
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1032742538
##########
superset-frontend/packages/superset-ui-chart-controls/src/sections/echartsTimeSeriesQuery.tsx:
##########
@@ -16,41 +16,47 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ContributionType, hasGenericChartAxes, t } from '@superset-ui/core';
-import { ControlPanelSectionConfig } from '../types';
-import { emitFilterControl } from '../shared-controls';
+import { hasGenericChartAxes, t } from '@superset-ui/core';
+import { ControlPanelSectionConfig, ControlSetRow } from '../types';
+import {
+ contributionModeControl,
+ emitFilterControl,
+ xAxisSortControl,
+ xAxisSortAscControl,
+} from '../shared-controls';
+
+const controlsWithoutXAxis: ControlSetRow[] = [
+ ['metrics'],
+ ['groupby'],
+ [contributionModeControl],
+ ['adhoc_filters'],
+ emitFilterControl,
+ ['limit'],
+ ['timeseries_limit_metric'],
+ ['order_desc'],
+ ['row_limit'],
+ ['truncate_metric'],
+ ['show_empty_columns'],
+];
export const echartsTimeSeriesQuery: ControlPanelSectionConfig = {
label: t('Query'),
expanded: true,
controlSetRows: [
[hasGenericChartAxes ? 'x_axis' : null],
[hasGenericChartAxes ? 'time_grain_sqla' : null],
- ['metrics'],
- ['groupby'],
- [
- {
- name: 'contributionMode',
- config: {
- type: 'SelectControl',
- label: t('Contribution Mode'),
- default: null,
- choices: [
- [null, t('None')],
- [ContributionType.Row, t('Row')],
- [ContributionType.Column, t('Series')],
- ],
- description: t('Calculate contribution per series or row'),
- },
Review Comment:
move `contributionMode` into CustomControls.ts
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1032789640
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts:
##########
@@ -17,25 +16,50 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
-import { DTTM_ALIAS, PostProcessingSort, RollingType } from '@superset-ui/core';
+import { isEmpty } from 'lodash';
+import {
+ ensureIsArray,
+ getMetricLabel,
+ getXAxisLabel,
+ hasGenericChartAxes,
+ isDefined,
+ PostProcessingSort,
+} from '@superset-ui/core';
import { PostProcessingFactory } from './types';
export const sortOperator: PostProcessingFactory<PostProcessingSort> = (
formData,
queryObject,
) => {
- const { x_axis: xAxis } = formData;
+ // the sortOperator only used in the barchart v2
+ const labelsInMetricsAndXAxis = [
+ getXAxisLabel(formData),
+ ...ensureIsArray(formData.metrics).map(metric => getMetricLabel(metric)),
+ ].filter(Boolean);
+
if (
- (xAxis || queryObject.is_timeseries) &&
- Object.values(RollingType).includes(formData.rolling_type)
+ hasGenericChartAxes &&
+ isDefined(formData?.x_axis_sort) &&
+ isDefined(formData?.x_axis_sort_asc) &&
+ labelsInMetricsAndXAxis.includes(formData.x_axis_sort) &&
+ // the sort operator doesn't support sort-by multiple series.
+ isEmpty(formData.groupby)
Review Comment:
Interestingly, these operators are used to "build" part of `Query Object`. I recently found that we might only use `formData` to generate an operator and don't use the `QueryObject`.
However, we need to consider more and more to see how to make an efficient and convenient abstraction on the queryObject generation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] Cmagno13 commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by "Cmagno13 (via GitHub)" <gi...@apache.org>.
Cmagno13 commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1426079555
![000000image](https://user-images.githubusercontent.com/97127080/218149647-ff858745-d529-4a8e-a553-28c600259186.png)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] Cmagno13 commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by "Cmagno13 (via GitHub)" <gi...@apache.org>.
Cmagno13 commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1426079106
Sorting on the 2v bar graph is not working. Any suggestions for correction.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] stephenLYZ commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
stephenLYZ commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1310396910
/testenv up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] villebro commented on a diff in pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
villebro commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1032760934
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts:
##########
@@ -17,25 +16,50 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
-import { DTTM_ALIAS, PostProcessingSort, RollingType } from '@superset-ui/core';
+import { isEmpty } from 'lodash';
+import {
+ ensureIsArray,
+ getMetricLabel,
+ getXAxisLabel,
+ hasGenericChartAxes,
+ isDefined,
+ PostProcessingSort,
+} from '@superset-ui/core';
import { PostProcessingFactory } from './types';
export const sortOperator: PostProcessingFactory<PostProcessingSort> = (
formData,
queryObject,
) => {
- const { x_axis: xAxis } = formData;
+ // the sortOperator only used in the barchart v2
+ const labelsInMetricsAndXAxis = [
+ getXAxisLabel(formData),
+ ...ensureIsArray(formData.metrics).map(metric => getMetricLabel(metric)),
+ ].filter(Boolean);
+
if (
- (xAxis || queryObject.is_timeseries) &&
- Object.values(RollingType).includes(formData.rolling_type)
+ hasGenericChartAxes &&
+ isDefined(formData?.x_axis_sort) &&
+ isDefined(formData?.x_axis_sort_asc) &&
+ labelsInMetricsAndXAxis.includes(formData.x_axis_sort) &&
+ // the sort operator doesn't support sort-by multiple series.
+ isEmpty(formData.groupby)
Review Comment:
Thought for the future: As `formData` will always be unstandardized (can contain more or less any property names), it will be difficult to harmonize functionality based on `formData`. So at some point we should move to using a base `queryObject`, which has already been converted to specific format (`columns` for dimensional grouping).
##########
superset/utils/pandas_postprocessing/utils.py:
##########
@@ -101,6 +101,14 @@ def _is_multi_index_on_columns(df: DataFrame) -> bool:
return isinstance(df.columns, pd.MultiIndex)
+def scalar_to_list(val: Any) -> Sequence[str]:
Review Comment:
nit: as we're calling this `scalar_to_list`, the return type should probably be `List[...]`:
```suggestion
def scalar_to_list(val: Any) -> List[str]:
```
Alternatively call it `scalar_to_sequence`.
##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts:
##########
@@ -17,25 +16,50 @@
* specific language governing permissions and limitationsxw
* under the License.
*/
-import { DTTM_ALIAS, PostProcessingSort, RollingType } from '@superset-ui/core';
+import { isEmpty } from 'lodash';
+import {
+ ensureIsArray,
+ getMetricLabel,
+ getXAxisLabel,
+ hasGenericChartAxes,
+ isDefined,
+ PostProcessingSort,
+} from '@superset-ui/core';
import { PostProcessingFactory } from './types';
export const sortOperator: PostProcessingFactory<PostProcessingSort> = (
formData,
queryObject,
) => {
- const { x_axis: xAxis } = formData;
+ // the sortOperator only used in the barchart v2
+ const labelsInMetricsAndXAxis = [
Review Comment:
To generalize and make this more specific to it's use case, could we call this `sortableLabels`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1032742836
##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx:
##########
@@ -354,7 +354,7 @@ const show_empty_columns: SharedControlConfig<'CheckboxControl'> = {
description: t('Show empty columns'),
};
-const datetime_columns_lookup: SharedControlConfig<'HiddenControl'> = {
+const temporal_columns_lookup: SharedControlConfig<'HiddenControl'> = {
Review Comment:
bycatch: rename the `datetime_columns_lookup` into `temporal_columns_lookup`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] sunsikai commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by "sunsikai (via GitHub)" <gi...@apache.org>.
sunsikai commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1459180253
Mix chart need Axis sort too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #21993: [WIP]feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1303589284
# [Codecov](https://codecov.io/gh/apache/superset/pull/21993?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#21993](https://codecov.io/gh/apache/superset/pull/21993?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dfac546) into [master](https://codecov.io/gh/apache/superset/commit/d52d72ce6402cc1f65f5d31eb2d984bf1a1a0257?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d52d72c) will **increase** coverage by `9.88%`.
> The diff coverage is `82.35%`.
> :exclamation: Current head dfac546 differs from pull request most recent head fadb6d4. Consider uploading reports for the commit fadb6d4 to get more accurate results
```diff
@@ Coverage Diff @@
## master #21993 +/- ##
==========================================
+ Coverage 55.66% 65.54% +9.88%
==========================================
Files 1814 1815 +1
Lines 69484 69533 +49
Branches 7473 7479 +6
==========================================
+ Hits 38675 45573 +6898
+ Misses 28885 22030 -6855
- Partials 1924 1930 +6
```
| Flag | Coverage Δ | |
|---|---|---|
| hive | `?` | |
| mysql | `78.39% <89.18%> (?)` | |
| postgres | `78.45% <89.18%> (?)` | |
| presto | `?` | |
| python | `78.51% <89.18%> (+20.46%)` | :arrow_up: |
| unit | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/21993?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...nd/packages/superset-ui-core/src/query/getXAxis.ts](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvZ2V0WEF4aXMudHM=) | `100.00% <ø> (ø)` | |
| [...superset-ui-core/src/query/types/PostProcessing.ts](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGFja2FnZXMvc3VwZXJzZXQtdWktY29yZS9zcmMvcXVlcnkvdHlwZXMvUG9zdFByb2Nlc3NpbmcudHM=) | `100.00% <ø> (ø)` | |
| [...charts/src/Timeseries/Regular/Bar/controlPanel.tsx](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9SZWd1bGFyL0Jhci9jb250cm9sUGFuZWwudHN4) | `31.25% <ø> (ø)` | |
| [.../plugin-chart-echarts/src/Timeseries/buildQuery.ts](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvVGltZXNlcmllcy9idWlsZFF1ZXJ5LnRz) | `71.42% <ø> (ø)` | |
| [...t-frontend/src/dashboard/actions/dashboardState.js](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2Rhc2hib2FyZFN0YXRlLmpz) | `37.09% <ø> (ø)` | |
| [superset-frontend/src/dashboard/actions/hydrate.js](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9hY3Rpb25zL2h5ZHJhdGUuanM=) | `1.78% <ø> (ø)` | |
| [...omponents/nativeFilters/FilterBar/Header/index.tsx](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0hlYWRlci9pbmRleC50c3g=) | `95.45% <0.00%> (+4.15%)` | :arrow_up: |
| [...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyc0NvbmZpZ01vZGFsL0ZpbHRlcnNDb25maWdGb3JtL0ZpbHRlcnNDb25maWdGb3JtLnRzeA==) | `59.50% <ø> (ø)` | |
| [...set-frontend/src/dashboard/util/permissionUtils.ts](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC91dGlsL3Blcm1pc3Npb25VdGlscy50cw==) | `90.00% <ø> (ø)` | |
| [...-frontend/src/explore/components/controls/index.js](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9pbmRleC5qcw==) | `100.00% <ø> (ø)` | |
| ... and [348 more](https://codecov.io/gh/apache/superset/pull/21993/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1310399669
@stephenLYZ Ephemeral environment spinning up at http://35.87.147.100:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #21993: [WIP]feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1013818589
##########
superset/utils/pandas_postprocessing/sort.py:
##########
@@ -14,22 +14,34 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-from typing import Dict
+from typing import List, Optional, Union
from pandas import DataFrame
from superset.utils.pandas_postprocessing.utils import validate_column_args
-@validate_column_args("columns")
-def sort(df: DataFrame, columns: Dict[str, bool]) -> DataFrame:
+# pylint: disable=invalid-name
+@validate_column_args("by")
+def sort(
Review Comment:
This function is useless as before so redesigning the interface is safe. The interface refers to Pandas.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] github-actions[bot] commented on pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #21993:
URL: https://github.com/apache/superset/pull/21993#issuecomment-1328052791
Ephemeral environment shutdown and build artifacts deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie merged pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie merged PR #21993:
URL: https://github.com/apache/superset/pull/21993
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] zhaoyongjie commented on a diff in pull request #21993: feat: Axis sort in the Bar Chart V2
Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on code in PR #21993:
URL: https://github.com/apache/superset/pull/21993#discussion_r1032786714
##########
superset/utils/pandas_postprocessing/utils.py:
##########
@@ -101,6 +101,14 @@ def _is_multi_index_on_columns(df: DataFrame) -> bool:
return isinstance(df.columns, pd.MultiIndex)
+def scalar_to_list(val: Any) -> Sequence[str]:
Review Comment:
nice catch, updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org