villebro commented on a change in pull request #17512:
URL: https://github.com/apache/superset/pull/17512#discussion_r761299909



##########
File path: superset/charts/schemas.py
##########
@@ -1157,6 +1157,8 @@ class ChartDataQueryContextSchema(Schema):
     result_type = EnumField(ChartDataResultType, by_value=True)
     result_format = EnumField(ChartDataResultFormat, by_value=True)
 
+    form_data = fields.Raw()

Review comment:
       I think we can add `allow_none=True` and `required=False` here, as we 
probably want to support explicitly passing a `null` value

##########
File path: tests/common/query_context_generator.py
##########
@@ -253,6 +253,7 @@ def generate(
                 )
             ],
             "result_type": ChartDataResultType.FULL,
+            "form_data": {},

Review comment:
       `form_data` should probably be added to the signature of the method and 
passed as-is to here instead of defaulting to an empty dict.

##########
File path: superset-frontend/packages/superset-ui-core/src/query/types/Query.ts
##########
@@ -158,6 +163,7 @@ export interface QueryContext {
   /** Response format */
   result_format: string;
   queries: QueryObject[];
+  form_data: QueryFormData;

Review comment:
       Should this be optional, as it is in the python code?
   ```
     form_data?: QueryFormData;
   ```




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