amaannawab923 commented on code in PR #36990:
URL: https://github.com/apache/superset/pull/36990#discussion_r2686169462
##########
superset-frontend/plugins/plugin-chart-ag-grid-table/src/controlPanel.tsx:
##########
@@ -252,7 +252,7 @@ const config: ControlPanelConfig = {
visibility: ({ controls }) => {
const dttmLookup = Object.fromEntries(
ensureIsArray(controls?.groupby?.options).map(option => [
- option.column_name,
+ (option.column_name || '').toLowerCase(),
option.is_dttm,
]),
Review Comment:
@VanessaGiannoni Yes, this is an excessive check and we can safely ignore
it.
Here's why:
controls?.groupby?.options contains ColumnMeta[] objects - these are
datasource metadata (column definitions from the database schema), not user
selections.
The ColumnMeta interface extends Column which defines column_name: string
- it's always a string at the type level, and at runtime these objects come
directly from the dataset schema where column names are inherently strings.
The confusion here is that CodeAnt AI conflated two different things:
1.groupby.value (user selections) → Can be string OR object (AdhocColumn)
2. groupby.options (datasource metadata) → Always ColumnMeta objects with
column_name: string
I verified this locally by logging controls?.groupby?.options?.map(o =>
o.column_name) and confirmed all values are strings.
--
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]