EnxDev commented on code in PR #41754:
URL: https://github.com/apache/superset/pull/41754#discussion_r3529935635
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/buildQuery.ts:
##########
@@ -661,6 +678,14 @@ const buildQuery: BuildQuery<TableChartFormData> = (
extraQueries.push({
...queryObject,
columns: [],
+ ...(rawSummaryColumns.length > 0 && {
+ metrics: rawSummaryColumns.map(columnName => ({
+ expressionType: 'SIMPLE' as const,
+ aggregate: 'SUM' as const,
+ column: { column_name: columnName },
Review Comment:
test added: a calculated column name in all_columns + rawSummaryColumns
flows through the intersection into the SUM metrics. To be precise about what
it does and doesn't prove: a frontend unit test can't exercise backend
resolution — from buildQuery's perspective a calculated column is just another
string. The backend side is the standard SIMPLE adhoc-metric path (column name
resolved through the dataset's columns, expression substituted server-side),
which is the same mechanism Explore's own adhoc metrics use on calculated
columns. What the new test genuinely pins is that the selection intersection
stays name-based and never silently starts assuming physical columns only.
--
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]