fix: support quoted select aliases#198
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for quoted aliases in the CQL-to-Bigtable SQL translation layer, ensuring that aliases in SELECT, GROUP BY, and ORDER BY clauses are correctly formatted with backticks when necessary. Feedback indicates that the alias formatting logic needs to escape backslashes in addition to backticks to prevent syntax errors in GoogleSQL. Additionally, the check for bare identifiers should be updated to use Bigtable SQL reserved keywords rather than CQL keywords to ensure full compatibility with the target environment.
dc191ed to
9770cd4
Compare
9770cd4 to
62e6e63
Compare
Summary
AS "TableBindName"andAS "select"prepare successfully.Test plan
go test ./translators/select_translator -run TestTranslator_TranslateSelectQuerytoBigtable -count=1go test ./parser ./translators/...