LevisNgigi commented on code in PR #33407:
URL: https://github.com/apache/superset/pull/33407#discussion_r2084430777


##########
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/buildQuery.ts:
##########
@@ -52,15 +52,19 @@
     {
       ...baseQueryObject,
       columns: [
-        ...(isXAxisSet(formData)
-          ? ensureIsArray(getXAxisColumn(formData))
+        ...(formData.aggregation
+          ? isXAxisSet(formData)
+            ? ensureIsArray(getXAxisColumn(formData))
+            : []
           : []),
       ],
-      ...(isXAxisSet(formData) ? {} : { is_timeseries: true }),
-      post_processing: [
-        pivotOperator(formData, baseQueryObject),
-        aggregationOperator(formData, baseQueryObject),
-      ],
+      is_timeseries: !!formData.aggregation,
+      post_processing: formData.aggregation
+        ? [
+            pivotOperator(formData, baseQueryObject),
+            aggregationOperator(formData, baseQueryObject),
+          ]
+        : [],

Review Comment:
   Thanks! I tried separating pivotOperator, but without aggregation, the time 
column is removed, which causes pivot to fail. So I kept it conditional to 
avoid data errors when the time column isn’t present. Also, not all 
post-processing is skipped, only the aggregation step is skipped when no 
aggregation method is selected.



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