justinpark commented on code in PR #34763: URL: https://github.com/apache/superset/pull/34763#discussion_r2294871482
########## superset-frontend/src/features/databases/UploadDataModel/index.tsx: ########## @@ -329,6 +337,18 @@ const UploadDataModal: FunctionComponent<UploadDataModalProps> = ({ form.resetFields(); }; + const validateTableName = + (currentDatabase: CurrentDatabase) => (_: any, value: string) => { + const isPrestoTrino = currentDatabase?.label + ?.toLowerCase() + .includes('trino'); + + if (isPrestoTrino && value.includes(' ')) { + return Promise.reject(t('Trino table names must not contain spaces')); + } + return Promise.resolve(); Review Comment: It doesn't seem ideal to explicitly check for specific cases. Instead, I think it's better to catch this issue during the backend process that executes the 'CREATE TABLE' statement and deliver it as an error message. -- 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: notifications-unsubscr...@superset.apache.org 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