You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/04/05 08:11:05 UTC
[GitHub] [superset] villebro commented on a diff in pull request #23575: feat: Drill by open in Explore
villebro commented on code in PR #23575:
URL: https://github.com/apache/superset/pull/23575#discussion_r1158162635
##########
superset-frontend/packages/superset-ui-core/src/query/types/Filter.ts:
##########
@@ -58,6 +58,7 @@ export interface FreeFormAdhocFilter {
expressionType: 'SQL';
clause: 'WHERE' | 'HAVING';
sqlExpression: string;
+ isExtra?: boolean;
Review Comment:
HIGHLY optional, but.. While we're at it, I believe `timeGrain` is also a valid prop for `FreeFormAdhocFilter`, similar to `BaseSimpleAdhocFilter` (at least it should be). The fact that this and `timeGrain` was missing here kinda indicates that we might benefit from some added abstraction, like
```typescript
interface BaseAdhocFilter = {
clause: 'WHERE' | 'HAVING';
timeGrain?: TimeGranularity;
isExtra?: boolean;
}
type BaseSimpleAdhocFilter = BaseAdhocFilter & {
expressionType: 'SIMPLE';
subject: string;
}
export type FreeFormAdhocFilter = BaseAdhocFilter & {
expressionType: 'SQL';
sqlExpression: string;
}
```
--
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