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 2018/11/15 07:52:19 UTC

[GitHub] williaster commented on a change in pull request #6377: [SIP-5] QueryBuilder in the client for granularity and groupby in word cloud

williaster commented on a change in pull request #6377: [SIP-5] QueryBuilder in the client for granularity and groupby in word cloud
URL: https://github.com/apache/incubator-superset/pull/6377#discussion_r233739481
 
 

 ##########
 File path: superset/assets/src/query/buildQueries.ts
 ##########
 @@ -0,0 +1,18 @@
+import { FormData, getGranularity } from './formData';
+
+// TODO: fill out the rest of the query object
+export interface QueryObject {
+  granularity: string;
+  groupby?: string[];
+}
+
+// Build the common segments of the query objects (e.g. the granularity field derived from
+// either sql alchemy or druid). The segments specific to each viz type is constructed in the
+// buildQuery method for each viz type (see `wordcloud/buildQuery.ts` for an example).
+// Note the type of the formData argument passed in here is the type of the formData for a
+// specific viz, which is a subtype of the generic formData shared among all viz types.
+export default function buildQueries<T extends FormData>(formData: T): QueryObject[] {
 
 Review comment:
   ^I think that's correct. E.g., time series with time shift is 2 queries on the backend now, so I think it will become 2 queries on the client.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org