kgabryje commented on code in PR #23239:
URL: https://github.com/apache/superset/pull/23239#discussion_r1121561880
##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilter/index.js:
##########
@@ -33,44 +34,24 @@ export const CLAUSES = {
WHERE: 'WHERE',
};
-const OPERATORS_TO_SQL = {
- '==': '=',
- '!=': '<>',
- '>': '>',
- '<': '<',
- '>=': '>=',
- '<=': '<=',
- IN: 'IN',
- 'NOT IN': 'NOT IN',
- LIKE: 'LIKE',
- ILIKE: 'ILIKE',
- REGEX: 'REGEX',
- 'IS NOT NULL': 'IS NOT NULL',
- 'IS NULL': 'IS NULL',
- 'IS TRUE': 'IS TRUE',
- 'IS FALSE': 'IS FALSE',
- 'LATEST PARTITION': ({ datasource }) =>
- `= '{{
presto.latest_partition('${datasource.schema}.${datasource.datasource_name}')
}}'`,
-};
-
const CUSTOM_OPERATIONS = [...CUSTOM_OPERATORS].map(
op => OPERATOR_ENUM_TO_OPERATOR_TYPE[op].operation,
);
-function translateToSql(adhocMetric, { useSimple } = {}) {
- if (adhocMetric.expressionType === EXPRESSION_TYPES.SIMPLE || useSimple) {
- const { subject, comparator } = adhocMetric;
+export function translateToSql(adhocFilter, { useSimple } = {}) {
Review Comment:
I was 100% sure that I deleted it :P thanks for spotting!
--
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]