codeant-ai-for-open-source[bot] commented on code in PR #40180:
URL: https://github.com/apache/superset/pull/40180#discussion_r3564869130
##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -108,6 +108,25 @@ interface TableSize {
height: number;
}
+const getCrossFilterValue = (
+ value: DataRecordValue,
+ column: DataColumnMeta | undefined,
+): DataRecordValue => {
+ const input = value instanceof DateWithFormatter ? value.input : value;
+ if (
+ column?.dataType === GenericDataType.Temporal &&
+ typeof input === 'string' &&
+ input.trim() !== '' &&
+ Number.isFinite(Number(input))
+ ) {
+ return Number(input);
+ }
+ if (value instanceof Date) {
+ return value.getTime();
+ }
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag the existing Date-to-epoch-milliseconds conversion in
TableChart cross-filter value mapping; preserving Date/DateWithFormatter as
epoch ms is intentional and should remain unchanged.
**Applied to:**
- `superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]