rusackas commented on code in PR #41492:
URL: https://github.com/apache/superset/pull/41492#discussion_r3685632458
##########
superset-frontend/src/SqlLab/components/EditorWrapper/useKeywords.ts:
##########
@@ -176,8 +196,8 @@ export function useKeywords(
}
let { caption } = data;
- if (data.meta === 'table' && caption.includes(' ')) {
- caption = `"${caption}"`;
+ if (data.meta === 'table') {
+ caption = quoteIdentifier(caption, identifierQuote);
}
Review Comment:
Good catch, fixed! Added a name/value fallback before quoting so a missing
`caption` doesn't blow up or insert `undefined`.
##########
superset/db_engine_specs/sybase.py:
##########
@@ -30,6 +30,11 @@ class SybaseEngineSpec(MssqlEngineSpec):
engine = "sybase"
engine_name = "SAP Sybase"
engine_aliases = {"sybase_sqlany"} # Support SQL Anywhere dialect too
+
+ # Unlike MSSQL, SAP ASE/SQL Anywhere quote identifiers with double quotes,
+ # not square brackets, so override the values inherited from
MssqlEngineSpec.
+ identifier_quote_start: str = '"'
Review Comment:
Ahh, good catch. Reverted to the inherited MSSQL brackets and updated the
Sybase test, ASE's quoted_identifier defaults OFF so double quotes were just
going to parse as string literals there.
--
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]