-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSqlEscapedSource: support for databricksRest provider #913
getSqlEscapedSource: support for databricksRest provider #913
Conversation
776af9d
to
130e6b7
Compare
Pull Request Test Coverage Report for Build 11029739616Details
💛 - Coveralls |
Visit the preview URL for this PR (updated for commit 75ed6ca): https://cartodb-fb-storybook-react-dev--pr913-bug-sc-442095-su-qa8hsz2m.web.app (expires Wed, 02 Oct 2024 09:03:39 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 517cc4d31d7e09cf277774e034094b67c301cd4c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
@@ -26,13 +26,15 @@ const fqnParseRegex = { | |||
`^${databricksIdentifierRegex}(?:\\.${databricksIdentifierRegex})?(?:\\.${databricksIdentifierRegex})?$` | |||
) | |||
}; | |||
fqnParseRegex[Provider.DatabricksRest] = fqnParseRegex[Provider.Databricks]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: I'll add this for consistency inside of fqnParseRegex
and will extract the Regex, rather than updating the object afterward, increasing (at least, IMHO) this part's readability, e.g.
const databricksRegex = `^${databricksIdentifierRegex}(?:\\.${databricksIdentifierRegex})?(?:\\.${databricksIdentifierRegex})?$`
const fqnParseRegex = {
...
[Provider.Databricks]: databricksRegex,
[Provider.DatabricksRest]: databricksRegex
}
Same applies to nameNeedsQuotesChecker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied more or less.
Description
Shortcut: https://app.shortcut.com/cartoteam/story/442095
getSqlEscapedSource
&FullyQualifiedName
to supportdatabricksRest
provider type - which is same asdatabricks
from SQL povType of change
(choose one and remove the others)
Acceptance
Already covered with UT
Basic checklist