PrakharAgarwal17 commented on code in PR #46008:
URL: https://github.com/apache/superset/pull/46008#discussion_r4473264150
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/buildQuery.ts:
##########
@@ -186,31 +187,32 @@ export const buildQueryUncached:
BuildQuery<TableChartFormData> = (
}
const temporalColumnsLookup = formData?.temporal_columns_lookup;
- // Filter out the column if needed and prepare the temporal column object
-
- columns = columns.filter(col => {
- const shouldBeAdded =
+ let firstTemporalColumn: AdhocColumn | undefined;
+ columns = columns.map(col => {
+ if (
isPhysicalColumn(col) &&
time_grain_sqla &&
- temporalColumnsLookup?.[col];
-
- if (shouldBeAdded && !temporalColumnAdded) {
- temporalColumn = {
+ temporalColumnsLookup?.[col]
+ ) {
+ const temporalColumn: AdhocColumn = {
timeGrain: time_grain_sqla,
columnType: 'BASE_AXIS',
sqlExpression: col,
label: col,
expressionType: 'SQL',
- } as AdhocColumn;
- temporalColumnAdded = true;
- return false; // Do not include this in the output; it's added
separately
+ ...(isSemanticView ? { isColumnReference: true } : {}),
Review Comment:
Done grained physical temporal columns now always include isColumnReference:
true in both the Table and AG Grid query builders.
--
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]