betodealmeida commented on code in PR #20338:
URL: https://github.com/apache/superset/pull/20338#discussion_r893990491


##########
superset/utils/core.py:
##########
@@ -1746,18 +1748,6 @@ def get_time_filter_status(
                     "column": ExtraFiltersTimeColumnType.TIME_ORIGIN,
                 }
             )
-
-    if ExtraFiltersTimeColumnType.GRANULARITY in applied_time_extras:
-        if datasource.type == "druid":
-            applied.append({"column": ExtraFiltersTimeColumnType.GRANULARITY})
-        else:
-            rejected.append(
-                {
-                    "reason": ExtraFiltersReasonType.NOT_DRUID_DATASOURCE,
-                    "column": ExtraFiltersTimeColumnType.GRANULARITY,
-                }
-            )

Review Comment:
   We should keep this, no?



##########
superset/utils/core.py:
##########
@@ -1737,6 +1737,8 @@ def get_time_filter_status(
             )
 
     if ExtraFiltersTimeColumnType.TIME_ORIGIN in applied_time_extras:
+        # This seems like it is to do with the druid time series, which I 
think we
+        # are still keeping mentions of.

Review Comment:
   Can you clarify this?



##########
superset-frontend/packages/superset-ui-core/test/query/processFilters.test.ts:
##########
@@ -115,20 +113,6 @@ describe('processFilters', () => {
             operator: '==',
             comparator: 'almond',
           },
-          {
-            expressionType: 'SIMPLE',
-            clause: 'HAVING',
-            subject: 'sweetness',
-            operator: '>',
-            comparator: '0',
-          },
-          {
-            expressionType: 'SIMPLE',
-            clause: 'HAVING',
-            subject: 'sweetness',
-            operator: '<=',
-            comparator: '50',
-          },

Review Comment:
   Are these Druid specific?



##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx:
##########
@@ -141,12 +139,8 @@ export const useSimpleTabFilterProps = (props: Props) => {
       );
     }
     return !(
-      (props.datasource.type === 'druid' &&
-        TABLE_ONLY_OPERATORS.indexOf(operator) >= 0) ||
-      (props.datasource.type === 'table' &&
-        DRUID_ONLY_OPERATORS.indexOf(operator) >= 0) ||
-      (props.adhocFilter.clause === CLAUSES.HAVING &&
-        HAVING_OPERATORS.indexOf(operator) === -1)
+      props.adhocFilter.clause === CLAUSES.HAVING &&
+      HAVING_OPERATORS.indexOf(operator) === -1

Review Comment:
   Might be cleaner to write as:
   
   ```js
   return (
       props.adhocFilter.clause !== CLAUSES.HAVING ||
       HAVING_OPERATORS.indexOf(operator) !== -1
   );
   ```



-- 
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]

Reply via email to