bito-code-review[bot] commented on PR #42296:
URL: https://github.com/apache/superset/pull/42296#issuecomment-5040528113
<!-- Bito Reply -->
The flagged issue is correct. In `EchartsTimeseries.tsx`, the temporal-type
check for forced-categorical axes uses `xAxis.label` instead of the normalized
`xAxisCol`. This can cause the lookup to fail when the label is `__timestamp`,
leading to an incorrect `==` filter instead of a time-bucket filter.
To resolve this, update the lookup to use `xAxisCol` instead of
`getColumnLabel(xAxis.label)`:
```typescript
//
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx
const xAxisFilter =
coltypeMapping?.[xAxisCol] === GenericDataType.Temporal
? getTemporalXAxisDrillByFilter(
xAxisCol,
categoryAxisValue,
formData.timeGrainSqla,
String(eventParams.name ?? categoryAxisValue),
)
: {
col: xAxisCol,
op: '==' as const,
val: categoryAxisValue,
formattedVal: String(categoryAxisValue),
};
```
I have checked the PR comments and there are no other pending review
comments to address. Would you like me to implement this fix for you?
**superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx**
```
const xAxisFilter =
coltypeMapping?.[xAxisCol] ===
GenericDataType.Temporal
? getTemporalXAxisDrillByFilter(
xAxisCol,
categoryAxisValue,
formData.timeGrainSqla,
String(eventParams.name ?? categoryAxisValue),
)
: {
col: xAxisCol,
op: '==' as const,
val: categoryAxisValue,
formattedVal: String(categoryAxisValue),
};
```
--
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]