villebro commented on a change in pull request #15324: URL: https://github.com/apache/superset/pull/15324#discussion_r656887497
########## File path: superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx ########## @@ -275,9 +275,10 @@ const FILTER_TYPE_NAME_MAPPING = { }; // TODO: add column_types field to DatasourceMeta +// We return true if column_types is undefined as a precaution against backend failing to return column_types const hasTemporalColumns = ( dataset: DatasourceMeta & { column_types: GenericDataType[] }, -) => dataset?.column_types?.includes(GenericDataType.TEMPORAL); +) => dataset?.column_types?.includes(GenericDataType.TEMPORAL) ?? true; Review comment: Could we make it even more bulletproof by checking for length of `column_types`? Something like `!dataset?.column_types?.length || dataset?.column_types?.includes(GenericDataType.TEMPORAL)`? The reason is I suspect the Druid connector might return an empty array. -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org