SBIN2010 commented on code in PR #45680:
URL: https://github.com/apache/superset/pull/45680#discussion_r4417804121
##########
superset-frontend/src/explore/exploreUtils/index.ts:
##########
@@ -466,10 +467,10 @@ export const getSimpleSQLExpression = (
);
const showComparator =
disableInputOperatorValues.indexOf(operator ?? '') === -1;
- // If returned value is an object after changing dataset
+ // A dataset column carries column_name. An adhoc column carries label.
let expression: string =
typeof subject === 'object'
- ? (subject?.column_name ?? '')
+ ? (subject?.column_name ?? subject?.label ?? '')
Review Comment:
Good catch—`getSimpleSQLExpression` no longer substitutes the `label`. It
now uses `column_name` for dataset columns and `sqlExpression` for Custom SQL.
The pill’s label still displays the `label` value, but only via
`getDefaultLabel`. The SQL tab now shows `CAST(order_date AS TIMESTAMP) =
'2021-01-01T00:00:00'` instead of the `bucket_date` alias.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]